From 202cfd4e3ef5e45da30489026e9ff98239a7b50e Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sun, 22 Sep 2024 23:03:32 +0100 Subject: [PATCH] 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. --- 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(); }