(svn r22111) -Codechange/fix-ish: upon cleaning a pool a destructor should not delete items from other pools

This commit is contained in:
rubidium
2011-02-19 18:02:17 +00:00
parent f575b45bae
commit 68bc93f950
4 changed files with 22 additions and 2 deletions

View File

@@ -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();