forked from rosebudai/OpenRCT2-Web
don't paint track of an invalid ride, should help reduce crashes
This commit is contained in:
1 parent
43a5cc92cc
commit
17c01a36a7
1 file changed
+4
@@ -1531,6 +1531,10 @@ void viewport_track_paint_setup(uint8 direction, int height, rct_map_element *ma
|
||||
|
||||
rideIndex = mapElement->properties.track.ride_index;
|
||||
ride = GET_RIDE(rideIndex);
|
||||
if (ride->type == RIDE_TYPE_NULL) {
|
||||
log_error("Attempted to paint invalid ride: %d", rideIndex);
|
||||
return;
|
||||
}
|
||||
|
||||
// HACK Set entrance style to plain if none to stop glitch until entrance track piece is implemented
|
||||
bool isEntranceStyleNone = false;
|
||||
|
||||
Reference in new issue
Block a user