diff options
author | rubidium <rubidium@openttd.org> | 2011-02-19 18:02:17 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2011-02-19 18:02:17 +0000 |
commit | 68bc93f95074702fde2876904198f585969201cc (patch) | |
tree | d4e944285ebe4ed2ea5bc068c1b854fbb5f95a4e /src/station.cpp | |
parent | f575b45bae4b84ad734541cdd59b794352f6c0c7 (diff) | |
download | openttd-68bc93f95074702fde2876904198f585969201cc.tar.xz |
(svn r22111) -Codechange/fix-ish: upon cleaning a pool a destructor should not delete items from other pools
Diffstat (limited to 'src/station.cpp')
-rw-r--r-- | src/station.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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(); |