diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index bdbe06698b..fdeab17d4d 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -1568,6 +1568,8 @@ inline byte IncreaseOvertakingCounter(RoadVehicle *v) static bool CheckRestartLoadingAtRoadStop(RoadVehicle *v) { + if (v->GetNumOrders() < 1) return false; + StationID station_id = v->current_order.GetDestination(); VehicleOrderID next_order_idx = AdvanceOrderIndexDeferred(v, v->cur_implicit_order_index); const Order *next_order = v->GetOrder(next_order_idx);