summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--roadveh_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index f552136ad..96e3c8099 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -1600,7 +1600,7 @@ void OnNewDay_RoadVeh(Vehicle *v)
CheckOrders(v);
//Current slot has expired
- if (v->current_order.type == OT_GOTO_STATION && v->u.road.slot_age-- == 0 && v->u.road.slot != NULL) {
+ if (v->current_order.type == OT_GOTO_STATION && v->u.road.slot != NULL && v->u.road.slot_age-- == 0) {
DEBUG(ms, 2) ("Multistop: Slot expired for vehicle %d (index %d) at stop 0x%x",
v->unitnumber, v->index, v->u.road.slot->xy);
ClearSlot(v);