Author: matt
Date: 2012-08-16 14:02:23 -0700 (Thu, 16 Aug 2012)
New Revision: 9667
Log:
STR 2730: avoid putting widgets into the delete list twice

Modified:
   branches/branch-3.0/src/fltk3/run.cxx

Modified: branches/branch-3.0/src/fltk3/run.cxx
===================================================================
--- branches/branch-3.0/src/fltk3/run.cxx       2012-08-16 20:59:36 UTC (rev 
9666)
+++ branches/branch-3.0/src/fltk3/run.cxx       2012-08-16 21:02:23 UTC (rev 
9667)
@@ -1741,6 +1741,11 @@
 void fltk3::delete_widget(fltk3::Widget *wi) {
   if (!wi) return;
 
+  // don;t add the same widget twice
+  for (int i = 0; i < num_dwidgets; i++) {
+    if (dwidgets[i]==wi) return;
+  }
+
   if (num_dwidgets >= alloc_dwidgets) {
     fltk3::Widget      **temp;
 

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

Reply via email to