1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-30 09:59:10 +00:00

(svn r22105) -Fix: crash when copying an orderlist to a vehicle that already had orders

This commit is contained in:
yexo
2011-02-18 21:46:45 +00:00
parent ff1e0a3ed3
commit 72e027e4d6

View File

@@ -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);
}