Author: spitzak
Date: 2007-06-12 09:08:38 -0400 (Tue, 12 Jun 2007)
New Revision: 5901
Log:
Previous fix for child windows on OSX crashed if you deleted the last
(or only) window.


Modified:
   trunk/src/Window.cxx

Modified: trunk/src/Window.cxx
===================================================================
--- trunk/src/Window.cxx        2007-06-11 18:26:31 UTC (rev 5900)
+++ trunk/src/Window.cxx        2007-06-12 13:08:38 UTC (rev 5901)
@@ -828,7 +828,11 @@
   for (; *pp; pp = &(*pp)->next) {
     if ((*pp)->children == x) (*pp)->children = x->brother;
     if ((*pp)->brother == x) (*pp)->brother = x->brother;
-    if (*pp == x) *pp = x->next;
+    if (*pp == x) {
+      *pp = x->next;
+      if(!*pp)
+        break;
+    }
   }
 #else
   for (; *pp != x; pp = &(*pp)->next) if (!*pp) return;

_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit

Reply via email to