diff options
Diffstat (limited to 'src/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index ca9f36c1b..9c362e448 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -694,11 +694,11 @@ void Vehicle::PreDestructor() if (this->IsEngineCountable()) { Company::Get(this->owner)->num_engines[this->engine_type]--; - if (this->owner == _local_company) InvalidateAutoreplaceWindow(this->engine_type, this->group_id); - - DeleteGroupHighlightOfVehicle(this); GroupStatistics::CountEngine(this, -1); if (this->IsPrimaryVehicle()) GroupStatistics::CountVehicle(this, -1); + + if (this->owner == _local_company) InvalidateAutoreplaceWindow(this->engine_type, this->group_id); + DeleteGroupHighlightOfVehicle(this); } if (this->type == VEH_AIRCRAFT && this->IsPrimaryVehicle()) { |