mirror of https://github.com/OpenRCT2/OpenRCT2.git
Guard against invalid fence better
This commit is contained in:
parent
f2d0b58908
commit
404fceaed9
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue