Code

fix crash: desktop->selection was not deleted when desktop is destroyed
authorbuliabyak <buliabyak@users.sourceforge.net>
Sun, 21 Sep 2008 22:16:54 +0000 (22:16 +0000)
committerbuliabyak <buliabyak@users.sourceforge.net>
Sun, 21 Sep 2008 22:16:54 +0000 (22:16 +0000)
src/desktop.cpp

index 92946cb7dfa5e04e6261452849753f674fb2e441..4f6ea7a5ac051e01ceef2f2d2467b36f1279d569 100644 (file)
@@ -339,6 +339,11 @@ void SPDesktop::destroy()
         temporary_item_list = NULL;
     }
 
+    if (selection) {
+        delete selection;
+        selection = NULL;
+    }
+
     namedview->hide(this);
 
     _activate_connection.disconnect();