From 24991b03ec2194dffdf0f2f5789fefd72f06ec8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Fri, 3 Jun 2016 13:12:43 +0200 Subject: [PATCH] Check for NULL mapElement in ride_update_station_blocksection Fixes #3434 --- src/ride/station.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ride/station.c b/src/ride/station.c index 5b3f7e159f..225788c4bf 100644 --- a/src/ride/station.c +++ b/src/ride/station.c @@ -66,7 +66,7 @@ static void ride_update_station_blocksection(rct_ride *ride, int stationIndex) if ((ride->status == RIDE_STATUS_CLOSED && ride->num_riders == 0) || (mapElement != NULL && mapElement->flags & 0x20)) { ride->station_depart[stationIndex] &= ~STATION_DEPART_FLAG; - if ((ride->station_depart[stationIndex] & STATION_DEPART_FLAG) || (mapElement->properties.track.sequence & 0x80)) + if ((ride->station_depart[stationIndex] & STATION_DEPART_FLAG) || (mapElement != NULL && (mapElement->properties.track.sequence & 0x80))) ride_invalidate_station_start(ride, stationIndex, 0); } else { if (!(ride->station_depart[stationIndex] & STATION_DEPART_FLAG)) {