From 4cc3beff4250d8f3e9f0c2ea81990ae137c095f3 Mon Sep 17 00:00:00 2001
From: mfranz <mfranz>
Date: Tue, 8 Nov 2005 11:05:50 +0000
Subject: [PATCH] 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.

---
 src/GUI/new_gui.cxx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
 }