1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-28 08:59:09 +00:00

Fix: Crash when exiting game with end game window open.

Caused by the end game window opening the highscore window on close, which `UnInitWindowSystem()` does not expect.
This commit is contained in:
2024-09-22 23:03:32 +01:00
parent c1db57840e
commit 202cfd4e3e

View File

@@ -128,7 +128,7 @@ struct EndGameWindow : EndGameHighScoreBaseWindow {
void Close([[maybe_unused]] int data = 0) override
{
if (!_networking) Command<CMD_PAUSE>::Post(PM_PAUSED_NORMAL, false); // unpause
if (_game_mode != GM_MENU) ShowHighscoreTable(this->window_number, this->rank);
if (_game_mode != GM_MENU && !_exit_game) ShowHighscoreTable(this->window_number, this->rank);
this->EndGameHighScoreBaseWindow::Close();
}