ecere/gui/Window: Fixed crash under MemoryGuard due to reassigning master from within...
authorJerome St-Louis <jerome@ecere.com>
Tue, 6 Mar 2012 03:34:48 +0000 (22:34 -0500)
committerJerome St-Louis <jerome@ecere.com>
Tue, 6 Mar 2012 03:34:48 +0000 (22:34 -0500)
ecere/src/gui/Window.ec

index c9b922e..6be0f73 100644 (file)
@@ -6135,7 +6135,13 @@ public:
                            Window slave = link.data;
                            next = link.next;
                            if(!slave.created && (slave.autoCreate || slave.wasCreated))
+                           {
                               slave.Create();
+                              // Things might have happened that invalidated 'next'...
+                              // Start over the search for slaves to create.
+                              // (Added this to fix crash with Stacker & Toolbar)
+                              next = slaves.first;
+                           }
                         }
                      }