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/vehicle.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/vehicle.cpp')
-rw-r--r-- | src/vehicle.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/vehicle.cpp b/src/vehicle.cpp index ec78d8f42..573610c6d 100644 --- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -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 */ |