DO NOT REPLY TO THIS MESSAGE. INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.
[STR New] Link: http://www.fltk.org/str.php?L1714 Version: 1.1-current Both on a linux platform I have access to and on OSF, all fltk programs crash in Fl_Preferences::~Fl_Preferences on exit. Debugging this led to the following patch, that fixes the crashes on both linux and OSF: Index: src/Fl_Preferences.cxx =================================================================== --- src/Fl_Preferences.cxx (revision 5914) +++ src/Fl_Preferences.cxx (working copy) @@ -116,7 +116,7 @@ */ Fl_Preferences::~Fl_Preferences() { - if (!node->parent()) delete rootNode; + if (node != NULL && !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 Link: http://www.fltk.org/str.php?L1714 Version: 1.1-current _______________________________________________ fltk-bugs mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk-bugs
