1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 05:53:02 +01:00

Fix #19803. Crash when invalid scenery element for sign

This commit is contained in:
Duncan
2023-04-03 09:27:19 +01:00
committed by GitHub
parent d7923c479e
commit 2afed4c272

View File

@@ -250,7 +250,10 @@ public:
main_colour_btn->type = WindowWidgetType::Empty;
text_colour_btn->type = WindowWidgetType::Empty;
if (wallEntry == nullptr)
{
return;
}
if (wallEntry->flags & WALL_SCENERY_HAS_PRIMARY_COLOUR)
{
main_colour_btn->type = WindowWidgetType::ColourBtn;
@@ -266,7 +269,10 @@ public:
main_colour_btn->type = WindowWidgetType::Empty;
text_colour_btn->type = WindowWidgetType::Empty;
if (sceneryEntry == nullptr)
{
return;
}
if (sceneryEntry->flags & LARGE_SCENERY_FLAG_HAS_PRIMARY_COLOUR)
{
main_colour_btn->type = WindowWidgetType::ColourBtn;