Changeset - r17374:3444b324cb23
[Not reviewed]
master
0 1 0
smatz - 14 years ago 2011-02-23 00:00:50
smatz@openttd.org
(svn r22130) -Fix: failed assert when loading savegame with empty shared orderlist
1 file changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/saveload/vehicle_sl.cpp
Show inline comments
 
@@ -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;
0 comments (0 inline, 0 general)