From f149d84d4c7a6b59832d1136b265696d9465a37d Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Mon, 23 Sep 2024 17:58:44 +0100 Subject: [PATCH] Fix: Crash when exiting game with end game window open. (#12962) Caused by the end game window opening the highscore window on close, which `UnInitWindowSystem()` does not expect. --- src/highscore_gui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/highscore_gui.cpp b/src/highscore_gui.cpp index 70bf6fc5c8..6d912c7cf5 100644 --- a/src/highscore_gui.cpp +++ b/src/highscore_gui.cpp @@ -128,7 +128,7 @@ struct EndGameWindow : EndGameHighScoreBaseWindow { void Close([[maybe_unused]] int data = 0) override { if (!_networking) Command::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(); }