diff --git a/distribution/changelog.txt b/distribution/changelog.txt index f18f9d92e1..5de4de6e01 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -1,6 +1,7 @@ 0.5.2 (in development) ------------------------------------------------------------------------ - Improved: [#26566] Improve the performance of sorting sprites. +- Fix: [#26565] Game crashes when switching to another tab in the guest window. - Fix: [#26583] The default tab is not highlighted when opening a ride window. - Fix: [#26602] Crash when locating the nearest mechanic for a ride that has not previously been inspected. - Fix: [#26615] Missing junction path tile in Build your own Six Flags Over Texas. diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 85e44fff61..a775923e90 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -487,10 +487,14 @@ namespace OpenRCT2::Ui::Windows return; } - const bool disablePickup = !peep->CanBePickedUp(); - if (disablePickup != isWidgetDisabled(WIDX_PICKUP)) - invalidate(); - setWidgetDisabled(WIDX_PICKUP, disablePickup); + if (page == WINDOW_GUEST_OVERVIEW) + { + const bool disablePickup = !peep->CanBePickedUp(); + if (disablePickup != isWidgetDisabled(WIDX_PICKUP)) + invalidate(); + setWidgetDisabled(WIDX_PICKUP, disablePickup); + } + setWidgetDisabled(WIDX_TAB_4, (getGameState().park.flags & PARK_FLAGS_NO_MONEY) != 0); setWidgetDisabled(WIDX_TAB_7, !Config::Get().general.debuggingTools); }