]> git.mxchange.org Git - flightgear.git/commitdiff
Don't use the [] notation here to test for the existence of a map member,
authormfranz <mfranz>
Tue, 8 Nov 2005 11:05:50 +0000 (11:05 +0000)
committermfranz <mfranz>
Tue, 8 Nov 2005 11:05:50 +0000 (11:05 +0000)
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.

src/GUI/new_gui.cxx

index f45b17ba761e5c3ec3a2618336ba6b4b26ed119c..d8658d3d61b24d77a62f9b15375e8ca7d0c3c7ad 100644 (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;
 }