From a16d0b71b386cefe93457ee518384dad2c0f382e Mon Sep 17 00:00:00 2001 From: Jonathan G Rennison Date: Sun, 28 Jun 2020 11:53:58 +0100 Subject: [PATCH] Fix handling of vehicles with no orders in departure board See: #162 --- src/departures.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/departures.cpp b/src/departures.cpp index b04bc76820..5be2e0d583 100644 --- a/src/departures.cpp +++ b/src/departures.cpp @@ -254,6 +254,7 @@ DepartureList* MakeDepartureList(StationID station, const std::vectorGetOrder(v->cur_implicit_order_index % v->GetNumOrders()); + if (order == nullptr) continue; DateTicks start_date = date_fract_scaled - v->current_order_time; if (v->cur_timetable_order_index != INVALID_VEH_ORDER_ID && v->cur_timetable_order_index != v->cur_real_order_index) { /* vehicle is taking a conditional order branch, adjust start time to compensate */