it isn't there, this is a bug. Thus centralize the error message so that it
doesn't have to be repeated everywhere. Of course, the calling code should
still consider that a returned property node may be 0.
{
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");
{
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