1
0
Fork 0

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.
This commit is contained in:
ThorstenB 2010-10-24 21:36:15 +02:00
parent 957a59e57a
commit d61e992d76

View file

@ -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;
}
}