diff options
-rw-r--r-- | src/saveload/vehicle_sl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/saveload/vehicle_sl.cpp b/src/saveload/vehicle_sl.cpp index 2cfc704a1..f3af88172 100644 --- a/src/saveload/vehicle_sl.cpp +++ b/src/saveload/vehicle_sl.cpp @@ -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; |