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:
parent
957a59e57a
commit
d61e992d76
1 changed files with 0 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue