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:
parent
ad969bc4cd
commit
4cc3beff42
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue