diff --git a/src/GUI/gui_funcs.cxx b/src/GUI/gui_funcs.cxx index 8ee2d9b44..bc6bdc9c8 100644 --- a/src/GUI/gui_funcs.cxx +++ b/src/GUI/gui_funcs.cxx @@ -166,10 +166,8 @@ void mkDialog (const char *txt) { NewGUI *gui = (NewGUI *)globals->get_subsystem("gui"); SGPropertyNode_ptr dlg = gui->getDialog("message"); - if (!dlg) { - SG_LOG(SG_GENERAL, SG_ALERT, "'message' dialog missing"); + if (!dlg) return; - } dlg->setStringValue("text/label", txt); dlg->setStringValue("button/legend", "OK"); diff --git a/src/GUI/new_gui.cxx b/src/GUI/new_gui.cxx index a0885b845..f45b17ba7 100644 --- a/src/GUI/new_gui.cxx +++ b/src/GUI/new_gui.cxx @@ -147,8 +147,9 @@ NewGUI::getDialog (const string &name) { if(_dialog_props.find(name) != _dialog_props.end()) return _dialog_props[name]; - else - return 0; + + SG_LOG(SG_GENERAL, SG_ALERT, "dialog '" << name << "' missing"); + return 0; } void