mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-07 14:58:22 +00:00
(svn r22130) -Fix: failed assert when loading savegame with empty shared orderlist
This commit is contained in:
parent
58c7f5c497
commit
678cf3553f
@ -307,6 +307,8 @@ void AfterLoadVehicles(bool part_of_load)
|
||||
FOR_ALL_VEHICLES(v) {
|
||||
if (v->First() != v || v->orders.list != NULL || v->previous_shared != NULL || v->next_shared == NULL) continue;
|
||||
|
||||
/* As above, allocating OrderList here is safe. */
|
||||
assert(OrderList::CanAllocateItem());
|
||||
v->orders.list = new OrderList(NULL, v);
|
||||
for (Vehicle *u = v; u != NULL; u = u->next_shared) {
|
||||
u->orders.list = v->orders.list;
|
||||
|
Loading…
Reference in New Issue
Block a user