diff options
-rw-r--r-- | src/order_cmd.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index 71edbb406..419d09691 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -2025,7 +2025,11 @@ VehicleOrderID ProcessConditionalOrder(const Order *order, const Vehicle *v) */ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth, bool pbs_look_ahead) { - if (conditional_depth > v->GetNumOrders()) return false; + if (conditional_depth > v->GetNumOrders()) { + v->current_order.Free(); + v->dest_tile = 0; + return false; + } switch (order->GetType()) { case OT_GOTO_STATION: |