ecere/gui: Solved a crash on setting parent to null before destroying/destructing
authorJerome St-Louis <jerome@ecere.com>
Tue, 24 Jul 2012 20:14:45 +0000 (16:14 -0400)
committerJerome St-Louis <jerome@ecere.com>
Tue, 24 Jul 2012 20:14:45 +0000 (16:14 -0400)
ecere/src/gui/Window.ec

index 341ccbb..f29a65a 100644 (file)
@@ -7797,6 +7797,12 @@ public:
                parent.childrenOrder.Delete(order);
             cycle = null;
             order = null;
+            // *** TODO: Added this here to solve crash on setting parent to null before destroying/destructing ***
+            //           Should something else be done?
+            if(parent && parent.activeChild == this)
+               parent.activeChild = null;
+            if(parent && parent.activeClient == this)
+               parent.activeClient = null;
 
             //if(created)
             {