From: mfranz Date: Tue, 8 Nov 2005 11:05:50 +0000 (+0000) Subject: Don't use the [] notation here to test for the existence of a map member, X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=4cc3beff4250d8f3e9f0c2ea81990ae137c095f3;p=flightgear.git 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. --- diff --git a/src/GUI/new_gui.cxx b/src/GUI/new_gui.cxx index f45b17ba7..d8658d3d6 100644 --- a/src/GUI/new_gui.cxx +++ b/src/GUI/new_gui.cxx @@ -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; }