summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2011-02-18 21:46:45 +0000
committeryexo <yexo@openttd.org>2011-02-18 21:46:45 +0000
commit72e027e4d6ff168ab9f77d1001f877c55071c59c (patch)
treea53e1cc407116771687baf06afaf9d3f464e42ce /src
parentff1e0a3ed362e13b05e3e722990e55efa688e31a (diff)
downloadopenttd-72e027e4d6ff168ab9f77d1001f877c55071c59c.tar.xz
(svn r22105) -Fix: crash when copying an orderlist to a vehicle that already had orders
Diffstat (limited to 'src')
-rw-r--r--src/order_cmd.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index ccfb330db..d327aa252 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -1470,6 +1470,7 @@ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
assert(dst->orders.list->GetFirstOrder() == NULL);
assert(!dst->orders.list->IsShared());
delete dst->orders.list;
+ assert(OrderList::CanAllocateItem());
dst->orders.list = new OrderList(first, dst);
}