[Uml-devel] branches/work/soc-umbrello/umbrello

Gopala Krishna A krishna.ggk at gmail.com
Thu Aug 7 18:32:27 UTC 2008


SVN commit 843741 by gopala:

Fixed a crash on exit due to double deletion of PinWidget.



 M  +6 -1      umlscene.cpp  


--- branches/work/soc-umbrello/umbrello/umlscene.cpp #843740:843741
@@ -1793,8 +1793,13 @@
 
 void UMLScene::removeAllWidgets()
 {
+    // Do this because ~QGraphicsItem deletes its children causing
+    // crash here due to double deletion!
+    foreach(NewUMLRectWidget *temp, m_WidgetList) {
+        temp->setParentItem(0);
+    }
+
     // Remove widgets.
-
     foreach(NewUMLRectWidget* temp , m_WidgetList) {
         // I had to take this condition back in, else umbrello
         // crashes on exit. Still to be analyzed.  --okellogg




More information about the umbrello-devel mailing list