From a22260b56a0adcb77d485d79cfb8933eaf237aea Mon Sep 17 00:00:00 2001 From: Xkeeper Date: Tue, 5 Feb 2019 11:02:22 -0800 Subject: [PATCH] Fix crash in MapAnimation re: small scenery [OpenRCT2/OpenRCT2#8662] --- src/openrct2/world/MapAnimation.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/openrct2/world/MapAnimation.cpp b/src/openrct2/world/MapAnimation.cpp index 0bb0e2b180..cde85d02fd 100644 --- a/src/openrct2/world/MapAnimation.cpp +++ b/src/openrct2/world/MapAnimation.cpp @@ -185,6 +185,9 @@ static bool map_animation_invalidate_small_scenery(int32_t x, int32_t y, int32_t continue; sceneryEntry = tileElement->AsSmallScenery()->GetEntry(); + if (sceneryEntry == nullptr) + continue; + if (scenery_small_entry_has_flag( sceneryEntry, SMALL_SCENERY_FLAG_FOUNTAIN_SPRAY_1 | SMALL_SCENERY_FLAG_FOUNTAIN_SPRAY_4 | SMALL_SCENERY_FLAG_SWAMP_GOO