1
0
Fork 0

Don't use the [] notation here to test for the existence of a map member,

because this creates an empty entry if it didn't exist. This made the
activation of the dialog mandatory before the next gui subsystem update()
happened. Otherwise fgfs segfaulted.
This commit is contained in:
mfranz 2005-11-08 11:05:50 +00:00
parent ad969bc4cd
commit 4cc3beff42

View file

@ -219,7 +219,7 @@ NewGUI::newDialog (SGPropertyNode* props)
return;
}
string name = cname;
if(!_active_dialogs[name])
if(_active_dialogs.find(name) == _active_dialogs.end())
_dialog_props[name] = props;
}