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

don't paint track of an invalid ride, should help reduce crashes

This commit is contained in:
IntelOrca
2016-01-07 23:16:17 +00:00
parent 43a5cc92cc
commit 17c01a36a7

View File

@@ -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;