Author: matt
Date: 2007-06-20 09:07:23 -0400 (Wed, 20 Jun 2007)
New Revision: 5917
Log:
STR #1714: fixed bad deallocation (NULL pointer issue) in Fl_Preferences.

Modified:
   branches/branch-1.1/src/Fl_Preferences.cxx

Modified: branches/branch-1.1/src/Fl_Preferences.cxx
===================================================================
--- branches/branch-1.1/src/Fl_Preferences.cxx  2007-06-19 17:50:14 UTC (rev 
5916)
+++ branches/branch-1.1/src/Fl_Preferences.cxx  2007-06-20 13:07:23 UTC (rev 
5917)
@@ -116,7 +116,7 @@
  */
 Fl_Preferences::~Fl_Preferences()
 {
-  if (!node->parent()) delete rootNode;
+  if (node && !node->parent()) delete rootNode;
   // DO NOT delete nodes! The root node will do that after writing the 
preferences
   // zero all pointer to avoid memory errors, event though
   // Valgrind does not complain (Cygwind does though)
@@ -757,7 +757,7 @@
     application_ = 0L;
   }
   delete prefs_->node;
-  prefs_ = 0L;
+  prefs_->node = 0L;
 }
 
 // read a preferences file and construct the group tree and with all entry 
leafs

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

Reply via email to