From a5df306a848cf7f740059308f2e53b4dbedac2a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Sun, 12 Feb 2017 22:36:15 +0100 Subject: [PATCH] Guard from null scenery entry --- src/openrct2/world/map.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/openrct2/world/map.c b/src/openrct2/world/map.c index 65154f6075..3c33391d7e 100644 --- a/src/openrct2/world/map.c +++ b/src/openrct2/world/map.c @@ -2760,6 +2760,10 @@ void game_command_place_scenery(sint32* eax, sint32* ebx, sint32* ecx, sint32* e } rct_scenery_entry* scenery_entry = get_small_scenery_entry(scenery_type); + if (scenery_entry == NULL) { + *ebx = MONEY32_UNDEFINED; + return; + } if(scenery_entry->small_scenery.flags & SMALL_SCENERY_FLAG_FULL_TILE || !(scenery_entry->small_scenery.flags & SMALL_SCENERY_FLAG9)){ if(scenery_entry->small_scenery.flags & (SMALL_SCENERY_FLAG9 | SMALL_SCENERY_FLAG24 | SMALL_SCENERY_FLAG25)){