1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-15 19:13:07 +01:00

Guard against invalid fence better

This commit is contained in:
Michał Janiszewski
2017-01-28 21:04:08 +01:00
committed by GitHub
parent f2d0b58908
commit 404fceaed9

View File

@@ -135,7 +135,7 @@ void fence_paint(uint8 direction, sint32 height, rct_map_element * map_element)
gPaintInteractionType = VIEWPORT_INTERACTION_ITEM_WALL;
rct_scenery_entry * sceneryEntry = get_wall_entry(map_element->properties.fence.type);
if (sceneryEntry == NULL) {
if (sceneryEntry == NULL || sceneryEntry == (rct_scenery_entry *)-1) {
return;
}
uint32 frameNum = 0;