(svn r22105) -Fix: crash when copying an orderlist to a vehicle that already had orders
This commit is contained in:
@@ -1470,6 +1470,7 @@ CommandCost CmdCloneOrder(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
|||||||
assert(dst->orders.list->GetFirstOrder() == NULL);
|
assert(dst->orders.list->GetFirstOrder() == NULL);
|
||||||
assert(!dst->orders.list->IsShared());
|
assert(!dst->orders.list->IsShared());
|
||||||
delete dst->orders.list;
|
delete dst->orders.list;
|
||||||
|
assert(OrderList::CanAllocateItem());
|
||||||
dst->orders.list = new OrderList(first, dst);
|
dst->orders.list = new OrderList(first, dst);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user