From 678cf3553f8d8728ac7dd43603df92a0c92952b5 Mon Sep 17 00:00:00 2001 From: smatz Date: Wed, 23 Feb 2011 00:00:50 +0000 Subject: (svn r22130) -Fix: failed assert when loading savegame with empty shared orderlist --- src/saveload/vehicle_sl.cpp | 2 ++ 1 file changed, 2 insertions(+) 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; -- cgit v1.2.3-70-g09d2