Fix some Game members not being freed after some startup errors

This commit is contained in:
Gregor Parzefall 2024-04-19 18:07:25 +02:00
parent d767ab0890
commit be0ec8c5a6
1 changed files with 4 additions and 0 deletions

View File

@ -4558,6 +4558,10 @@ void the_game(bool *kill,
error_message = std::string("ModError: ") + e.what() +
strgettext("\nCheck debug.txt for details.");
errorstream << error_message << std::endl;
} catch (...) {
// Game::shutdown must always be called.
game.shutdown();
throw;
}
game.shutdown();
}