1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 16:24:35 +01:00

Fix #9764: NRE in ride_entrance_exit_paint

This commit is contained in:
Ted John
2019-08-08 12:37:53 +01:00
parent 601780722f
commit 2cfad1fc66

View File

@@ -69,7 +69,12 @@ static void ride_entrance_exit_paint(paint_session* session, uint8_t direction,
}
#endif
Ride* ride = get_ride(tile_element->AsEntrance()->GetRideIndex());
auto ride = get_ride(tile_element->AsEntrance()->GetRideIndex());
if (ride == nullptr)
{
return;
}
auto stationObj = ride_get_station_object(ride);
if (stationObj == nullptr || stationObj->BaseImageId == 0)
{