]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/fg_commands.cxx
Support a --no-default-config option.
[flightgear.git] / src / Main / fg_commands.cxx
index b248e13834ce2e010124edd10b8c3ac6f6f744f8..5611cbf10c471f0e548348da1bee9d280f5b19d5 100644 (file)
@@ -49,6 +49,7 @@
 #include "logger.hxx"
 #include "util.hxx"
 #include "main.hxx"
+#include "positioninit.hxx"
 
 #include <boost/scoped_array.hpp>
 
@@ -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;