1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Fix #13871: Crash on banner window invalidation

This commit is contained in:
ζeh Matt
2021-01-19 23:44:22 +02:00
committed by GitHub
parent 354a131892
commit 40a23db14b

View File

@@ -275,7 +275,7 @@ static void window_banner_invalidate(rct_window* w)
// Scenery item not sure why we use this instead of banner?
rct_scenery_entry* sceneryEntry = get_banner_entry(banner->type);
if (sceneryEntry->banner.flags & BANNER_ENTRY_FLAG_HAS_PRIMARY_COLOUR)
if (sceneryEntry != nullptr && (sceneryEntry->banner.flags & BANNER_ENTRY_FLAG_HAS_PRIMARY_COLOUR))
{
colour_btn->type = WindowWidgetType::ColourBtn;
}