From 68bc93f95074702fde2876904198f585969201cc Mon Sep 17 00:00:00 2001 From: rubidium Date: Sat, 19 Feb 2011 18:02:17 +0000 Subject: (svn r22111) -Codechange/fix-ish: upon cleaning a pool a destructor should not delete items from other pools --- src/station.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/station.cpp') diff --git a/src/station.cpp b/src/station.cpp index 9f59d72f8..8933015f8 100644 --- a/src/station.cpp +++ b/src/station.cpp @@ -70,7 +70,12 @@ Station::Station(TileIndex tile) : */ Station::~Station() { - if (CleaningPool()) return; + if (CleaningPool()) { + for (CargoID c = 0; c < NUM_CARGO; c++) { + this->goods[c].cargo.OnCleanPool(); + } + return; + } while (!this->loading_vehicles.empty()) { this->loading_vehicles.front()->LeaveStation(); -- cgit v1.2.3-54-g00ecf