No more game crashing for xml errors

This commit is contained in:
titiger 2016-11-23 00:31:54 +01:00
parent 0c5e9241f1
commit 32c7208a18
2 changed files with 2 additions and 0 deletions

View File

@ -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;}

View File

@ -706,6 +706,7 @@ void Program::setState(ProgramState *programStateNew, bool cleanupOldState) {
try {
Game *game = dynamic_cast<Game *>(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) {