diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/vehicle.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 693b2e269..63ffc0927 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -606,6 +606,11 @@ void DeleteVehicleChain(Vehicle *v) do { Vehicle *u = v; + if (!(v->vehstatus & VS_HIDDEN)) { + /* sometimes, eg. for disaster vehicles, when company bankrupts, when removing crashed/flooded vehicles, + * it may happen that vehicle chain is deleted when visible */ + MarkAllViewportsDirty(v->left_coord, v->top_coord, v->right_coord + 1, v->bottom_coord + 1); + } v = v->Next(); delete u; } while (v != NULL); |