diff --git a/src/Main/fg_commands.cxx b/src/Main/fg_commands.cxx index 46c6851b3..e3b6be0c0 100644 --- a/src/Main/fg_commands.cxx +++ b/src/Main/fg_commands.cxx @@ -1211,7 +1211,15 @@ do_play_audio_sample (const SGPropertyNode * arg) static bool do_presets_commit (const SGPropertyNode * arg) { - fgReInitSubsystems(); + if (fgGetBool("/sim/initialized", false)) { + fgReInitSubsystems(); + } else { + // 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(); + } + return true; } diff --git a/src/Main/fg_init.cxx b/src/Main/fg_init.cxx index 024e6e2f7..65be585e4 100644 --- a/src/Main/fg_init.cxx +++ b/src/Main/fg_init.cxx @@ -1491,6 +1491,8 @@ bool fgInitSubsystems() { // End of subsystem initialization. //////////////////////////////////////////////////////////////////// + fgSetBool("/sim/initialized", true); + SG_LOG( SG_GENERAL, SG_INFO, endl); // Save the initial state for future