From 49ea0e9092787a5ff8dc2b47450f2903324129fe Mon Sep 17 00:00:00 2001 From: frosch Date: Mon, 31 Jan 2011 20:56:02 +0000 Subject: [PATCH] (svn r21934) -Fix (r21933): The original plan was to run the regression before committing. --- src/order_cmd.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp index e7456fbdfe..6ae43c3e2b 100644 --- a/src/order_cmd.cpp +++ b/src/order_cmd.cpp @@ -1860,7 +1860,7 @@ bool UpdateOrderDest(Vehicle *v, const Order *order, int conditional_depth) /* Get the current order */ order = v->GetOrder(v->cur_real_order_index); - if (order->IsType(OT_AUTOMATIC)) { + if (order != NULL && order->IsType(OT_AUTOMATIC)) { assert(v->GetNumManualOrders() == 0); order = NULL; } @@ -1927,7 +1927,7 @@ bool ProcessOrders(Vehicle *v) v->UpdateRealOrderIndex(); const Order *order = v->GetOrder(v->cur_real_order_index); - if (order->IsType(OT_AUTOMATIC)) { + if (order != NULL && order->IsType(OT_AUTOMATIC)) { assert(v->GetNumManualOrders() == 0); order = NULL; }