From 5fe30de455f5fd5c1a91840898399c39f8cbd595 Mon Sep 17 00:00:00 2001 From: rubidium Date: Mon, 13 Jul 2009 09:15:11 +0000 Subject: [PATCH] (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. --- src/vehicle.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/vehicle.cpp b/src/vehicle.cpp index 34ad91492f..bed1d0fcc7 100644 --- 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)) {