[Uml-devel] [Bug 93219] crash on loading autosave.xmi
Oliver Kellogg
okellogg at users.sourceforge.net
Wed Dec 8 23:30:04 UTC 2004
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=93219
okellogg users sourceforge net changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
------- Additional Comments From okellogg users sourceforge net 2004-12-09 08:29 -------
CVS commit by okellogg:
Use reentrant iterators.
BUG:93219
M +7 -4 umldoc.cpp 1.210
--- kdesdk/umbrello/umbrello/umldoc.cpp #1.209:1.210
@ -1341,10 +1341,12 @ void UMLDoc::addAssociation(UMLAssociati
// information was taken from the <UML:AssocWidget> tag.
UMLAssociationList assocs = getAssociations();
- UMLAssociation *a;
- for (a = assocs.first(); a; a = assocs.next()) {
+ for (UMLAssociationListIt ait(assocs); ait.current(); ++ait) {
+ UMLAssociation *a = ait.current();
// check if its already been added (shouldnt be the case right now
- // as UMLAssociations only belong to one associationwidget at a time right now)
+ // as UMLAssociations only belong to one associationwidget at a time)
if (a == Assoc)
{
+ kdDebug() << "UMLDoc::addAssociation: duplicate addition attempted"
+ << endl;
return;
}
@ -1371,5 +1373,6 @ void UMLDoc::addAssocToConcepts(UMLAssoc
Uml::IDType BId = a->getObjectId(Uml::B);
UMLClassifierList concepts = getConcepts();
- for (UMLClassifier *c = concepts.first(); c; c = concepts.next()) {
+ for (UMLClassifierListIt it(concepts); it.current(); ++it) {
+ UMLClassifier *c = it.current();
switch (a->getAssocType()) {
// for the next cases should add association to all classes involved
More information about the umbrello-devel
mailing list