From d61e992d765f0b7c59c74e8cb0d6004d5f2e596d Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 24 Oct 2010 21:36:15 +0200 Subject: [PATCH] Fix occasional start-up crash when reading GUI XMLs. _dialog_props holds SGSharedPtrs (pointers managed by reference counters). Explicitly casting the object to an unmanaged SGPropertyNode* and deleting it may cause heap corruption, since the following assignment "_dialog_props[..] = ..." also tries to delete the (already deleted) object. --- src/GUI/new_gui.cxx | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/GUI/new_gui.cxx b/src/GUI/new_gui.cxx index 034484e27..51bc82fc9 100644 --- a/src/GUI/new_gui.cxx +++ b/src/GUI/new_gui.cxx @@ -296,9 +296,6 @@ NewGUI::readDir (const char * path) continue; } string name = nameprop->getStringValue(); - if (_dialog_props[name]) - delete (SGPropertyNode *)_dialog_props[name]; - _dialog_props[name] = props; } } -- 2.39.5