diff --git a/src/vehicle.cpp b/src/vehicle.cpp --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -51,6 +51,7 @@ #include "engine_base.h" #include "newgrf.h" #include "core/backup_type.hpp" +#include "order_backup.h" #include "table/sprites.h" #include "table/strings.h" @@ -674,6 +675,7 @@ void Vehicle::PreDestructor() DeleteWindowById(WC_VEHICLE_DETAILS, this->index); DeleteWindowById(WC_VEHICLE_TIMETABLE, this->index); SetWindowDirty(WC_COMPANY, this->owner); + OrderBackup::ClearVehicle(this); } InvalidateWindowClassesData(GetWindowClassForVehicleType(this->type), 0);