diff --git a/distribution/changelog.txt b/distribution/changelog.txt index db6780ec30..b41c9335e9 100644 --- a/distribution/changelog.txt +++ b/distribution/changelog.txt @@ -8,6 +8,7 @@ - Change: [#7877] Files are now sorted in logical rather than dictionary order. - Change: [#8688] Move common actions from debug menu into cheats menu. - Fix: [#5579] Network desync immediately after connecting. +- Fix: [#5893] Looking at guest window tabs other than the main tab eventually causes assertion. - Fix: [#5905] Urban Park merry-go-round has entrance and exit swapped (original bug). - Fix: [#6006] Objects higher than 6 metres are considered trees (original bug). - Fix: [#7884] Unfinished preserved rides can be demolished with quick demolish. diff --git a/src/openrct2-ui/windows/Guest.cpp b/src/openrct2-ui/windows/Guest.cpp index 1f11beff28..35221ccd01 100644 --- a/src/openrct2-ui/windows/Guest.cpp +++ b/src/openrct2-ui/windows/Guest.cpp @@ -1089,8 +1089,6 @@ void window_guest_overview_invalidate(rct_window* w) */ void window_guest_overview_update(rct_window* w) { - Peep* peep = GET_PEEP(w->number); - int32_t var_496 = w->var_496; var_496++; var_496 %= 24; @@ -1099,7 +1097,8 @@ void window_guest_overview_update(rct_window* w) widget_invalidate(w, WIDX_TAB_1); widget_invalidate(w, WIDX_TAB_2); - if (peep->window_invalidate_flags & PEEP_INVALIDATE_PEEP_ACTION) + Peep* peep = GET_PEEP(w->number); + if (peep != nullptr && peep->window_invalidate_flags & PEEP_INVALIDATE_PEEP_ACTION) { peep->window_invalidate_flags &= ~PEEP_INVALIDATE_PEEP_ACTION; widget_invalidate(w, WIDX_ACTION_LBL);