1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-04 13:42:55 +01:00

Fix crash when map window tries to plot a ride entrances (#8059)

This commit is contained in:
Hielke Morsink
2018-10-06 14:14:09 +02:00
committed by GitHub
parent 7fd0571b9c
commit f468bef6cc

View File

@@ -1589,7 +1589,9 @@ static uint16_t map_window_get_pixel_colour_ride(CoordsXY c)
case TILE_ELEMENT_TYPE_ENTRANCE:
if (tileElement->AsEntrance()->GetEntranceType() == ENTRANCE_TYPE_PARK_ENTRANCE)
break;
// fall-through
ride = get_ride(tileElement->AsEntrance()->GetRideIndex());
colourA = RideKeyColours[RideColourKey[ride->type]];
break;
case TILE_ELEMENT_TYPE_TRACK:
ride = get_ride(tileElement->AsTrack()->GetRideIndex());
colourA = RideKeyColours[RideColourKey[ride->type]];