(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

@@ -736,7 +736,10 @@ Vehicle::~Vehicle()
{
free(this->name);
if (CleaningPool()) return;
if (CleaningPool()) {
this->cargo.OnCleanPool();
return;
}
/* sometimes, eg. for disaster vehicles, when company bankrupts, when removing crashed/flooded vehicles,
* it may happen that vehicle chain is deleted when visible */