[Korganizer-devel] [Bug 101696] korganizer crash at startup for a particular std.ics file
Martin Koller
m.koller at surfeu.at
Sat Dec 16 11:21:53 CET 2006
------- 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=101696
m.koller surfeu at changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From m.koller surfeu at 2006-12-16 11:21 -------
SVN commit 614095 by mkoller:
BUG: 101696
Break recursive relation to avoid endless loop
M +14 -1 kotodoview.cpp
--- branches/KDE/3.5/kdepim/korganizer/kotodoview.cpp #614094:614095
@ -590,6 +590,9 @
// Use dynamic_cast, because in the future the related item might also be an event
Todo *relatedTodo = dynamic_cast<Todo *>(incidence);
+ // just make sure we know we have this item already to avoid endless recursion (Bug 101696)
+ mTodoMap.insert(todo,0);
+
// kdDebug(5850) << " has Related" << endl;
QMap<Todo *,KOTodoViewItem *>::ConstIterator itemIterator;
itemIterator = mTodoMap.find(relatedTodo);
@ -599,7 +602,17 @
}
// isn't this pretty stupid? We give one Todo to the KOTodoViewItem
// and one into the map. Sure finding is more easy but why? -zecke
- KOTodoViewItem *todoItem = new KOTodoViewItem(*itemIterator,todo,this);
+ KOTodoViewItem *todoItem;
+
+ // in case we found a related parent, which has no KOTodoViewItem yet, this must
+ // be the case where 2 items refer to each other, therefore simply create item as root item
+ if ( *itemIterator == 0 ) {
+ todo->setRelatedTo(0); // break the recursion, else we will have troubles later
+ todoItem = new KOTodoViewItem(mTodoListView,todo,this);
+ }
+ else
+ todoItem = new KOTodoViewItem(*itemIterator,todo,this);
+
return mTodoMap.insert(todo,todoItem);
} else {
// kdDebug(5850) << " no Related" << endl;
More information about the Korganizer-devel
mailing list