(svn r8294) -Fix: deleting a vehicle with shared orders, but no orders would fail to reset prev_shared and next_shared
-As a result, vehicles in the game could end up having prev/next pointers to vehicles, that was no longer in the game
This commit is contained in:
@@ -572,7 +572,7 @@ void DestroyVehicle(Vehicle *v)
|
||||
|
||||
UpdateVehiclePosHash(v, INVALID_COORD, 0);
|
||||
v->next_hash = NULL;
|
||||
if (v->orders != NULL) DeleteVehicleOrders(v);
|
||||
if (IsPlayerBuildableVehicleType(v)) DeleteVehicleOrders(v);
|
||||
|
||||
/* Now remove any artic part. This will trigger an other
|
||||
* destroy vehicle, which on his turn can remove any
|
||||
|
Reference in New Issue
Block a user