mirror of https://github.com/OpenRCT2/OpenRCT2.git
don't paint track of an invalid ride, should help reduce crashes
This commit is contained in:
parent
43a5cc92cc
commit
17c01a36a7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue