Skip to content

Commit

Permalink
Close OpenRCT2#23018: Close windows before loading new game
Browse files Browse the repository at this point in the history
  • Loading branch information
Gymnasiast committed Oct 22, 2024
1 parent 75d06c8 commit 6755c98
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions distribution/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
- Fix: [#22962] Fuzzy horizontal-to-vertical line transitions in charts.
- Fix: [#23009] Scenarios from RCT Classic (.sea files) are not included in the scenario index.
- Fix: [#23015] Crash when loading a save game when the construction window is still open.
- Fix: [#23018] Crash when loading a new game when the construction window is still open.
- Fix: [#23023] Large scenery clearance height interpreted as negative when greater than 127.

0.4.15 (2024-10-06)
Expand Down
6 changes: 5 additions & 1 deletion src/openrct2/Game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,11 @@ static void GameLoadOrQuitNoSavePromptCallback(int32_t result, const utf8* path)

static void NewGameWindowCallback(const utf8* path)
{
WindowCloseByClass(WindowClass::EditorObjectSelection);
// Closing this will cause a Ride window to pop up, so we have to do this to ensure that
// no windows are open (besides the toolbars and LoadSave window).
WindowCloseByClass(WindowClass::RideConstruction);
WindowCloseAllExceptClass(WindowClass::Loadsave);

GameNotifyMapChange();
GetContext()->LoadParkFromFile(path, false, true);
GameLoadScripts();
Expand Down

0 comments on commit 6755c98

Please sign in to comment.