diff --git a/source/glest_game/game/game.h b/source/glest_game/game/game.h index 84a094ca..f17756f9 100644 --- a/source/glest_game/game/game.h +++ b/source/glest_game/game/game.h @@ -243,6 +243,7 @@ public: GameSettings *getGameSettings() {return &gameSettings;} void setGameSettings(GameSettings *settings) { gameSettings = *settings;} const GameSettings *getReadOnlyGameSettings() const {return &gameSettings;} + void setQuitPendingIndicator() { quitPendingIndicator = true;} const GameCamera *getGameCamera() const {return &gameCamera;} GameCamera *getGameCameraPtr() {return &gameCamera;} diff --git a/source/glest_game/main/program.cpp b/source/glest_game/main/program.cpp index 95b47f85..c8d4a695 100644 --- a/source/glest_game/main/program.cpp +++ b/source/glest_game/main/program.cpp @@ -706,6 +706,7 @@ void Program::setState(ProgramState *programStateNew, bool cleanupOldState) { try { Game *game = dynamic_cast(programStateNew); Renderer &renderer= Renderer::getInstance(); + game->setQuitPendingIndicator();// by this the world is no more updated renderer.initGame(game,game->getGameCameraPtr()); } catch(megaglest_runtime_error& ex2) {