# HG changeset patch # User rubidium # Date 2009-07-13 09:15:11 # Node ID 9b0659d2ff5d5357449184a35b2b71f751521cf2 # Parent 762810b4a6c77450170447407a5df798b7a38937 (svn r16801) -Fix [FS#3022]: cargo payments weren't destroyed when a vehicle was destructed. This only happened when you crashed a vehicle while it was unloading. diff --git a/src/vehicle.cpp b/src/vehicle.cpp --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -497,6 +497,8 @@ void Vehicle::PreDestructor() Station::Get(this->last_station_visited)->loading_vehicles.remove(this); HideFillingPercent(&this->fill_percent_te_id); + + delete this->cargo_payment; } if (IsEngineCountable(this)) {