X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Ffg_commands.cxx;h=5611cbf10c471f0e548348da1bee9d280f5b19d5;hb=3b6c2c426d8fa1b72b7563383cecbba8eb0ff018;hp=b248e13834ce2e010124edd10b8c3ac6f6f744f8;hpb=0554d987e821961857dffdee33cf2277f8951a6d;p=flightgear.git diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index b248e1383..5611cbf10 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -49,6 +49,7 @@ #include "logger.hxx" #include "util.hxx" #include "main.hxx" +#include "positioninit.hxx" #include @@ -1021,7 +1022,10 @@ static bool 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 @@ -1228,7 +1232,7 @@ do_presets_commit (const SGPropertyNode * arg) // Nasal can trigger this during initial init, which confuses // the logic in ReInitSubsystems, since initial state has not been // saved at that time. Short-circuit everything here. - fgInitPosition(); + flightgear::initPosition(); } return true;