summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-01-31 20:56:02 +0000
committerfrosch <frosch@openttd.org>2011-01-31 20:56:02 +0000
commit49ea0e9092787a5ff8dc2b47450f2903324129fe (patch)
tree22c2cb5df976ab24b4e0233470efc6ea191c8b9e
parenta97d52a29a990132a8a5e4dd60304483617cec50 (diff)
downloadopenttd-49ea0e9092787a5ff8dc2b47450f2903324129fe.tar.xz
(svn r21934) -Fix (r21933): The original plan was to run the regression before committing.
-rw-r--r--src/order_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index e7456fbdf..6ae43c3e2 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;
}