forked from mirror/OpenTTD
(svn r22111) -Codechange/fix-ish: upon cleaning a pool a destructor should not delete items from other pools
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user