#include "logger.hxx"
#include "util.hxx"
#include "main.hxx"
+#include "positioninit.hxx"
#include <boost/scoped_array.hpp>
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
// 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;