const char *dialog_name = "atc-dialog";
_gui = (NewGUI *)globals->get_subsystem("gui");
+ if (!_gui) {
+ return;
+ }
+
SGPropertyNode_ptr dlg = _gui->getDialogProperties(dialog_name);
if (!dlg)
return;
do_dialog_new (const SGPropertyNode * arg)
{
NewGUI * gui = (NewGUI *)globals->get_subsystem("gui");
-
+ if (!gui) {
+ return false;
+ }
+
// Note the casting away of const: this is *real*. Doing a
// "dialog-apply" command later on will mutate this property node.
// I'm not convinced that this isn't the Right Thing though; it