1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-20 21:43:06 +01:00

Guard from null scenery entry

This commit is contained in:
Michał Janiszewski
2017-02-12 22:36:15 +01:00
committed by Michał Janiszewski
parent 2609242780
commit a5df306a84

View File

@@ -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)){