ecere/gui/Window: Fix for endless loop in FormDesigner/CodeEditor when Create() fails...
authorJerome St-Louis <jerome@ecere.com>
Wed, 7 Mar 2012 20:03:58 +0000 (15:03 -0500)
committerJerome St-Louis <jerome@ecere.com>
Wed, 7 Mar 2012 20:03:58 +0000 (15:03 -0500)
ecere/src/gui/Window.ec

index eb58391..2f7ee6f 100644 (file)
@@ -6141,11 +6141,11 @@ public:
                            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;
+                              if(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;
                            }
                         }
                      }