@@ -532,24 +532,25 @@ void Vehicle::PreDestructor()
/* Now remove any artic part. This will trigger an other
* destroy vehicle, which on his turn can remove any
* other artic parts. */
if ((this->type == VEH_TRAIN && EngineHasArticPart(this)) || (this->type == VEH_ROAD && RoadVehHasArticPart(this))) {
delete this->Next();
}
Window **wp;
FOR_ALL_WINDOWS(wp) {
Window *w = *wp;
if (w->viewport != NULL && WP(w, vp_d).follow_vehicle == this->index) {
ScrollMainWindowTo(this->x_pos, this->y_pos); // lock the main view on the vehicle's last position
WP(w, vp_d).follow_vehicle = INVALID_VEHICLE;
Vehicle::~Vehicle()
{
DeleteName(this->string_id);
if (CleaningPool()) return;
this->SetNext(NULL);
Status change: