summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-08-06 14:08:25 +0000
committerrubidium <rubidium@openttd.org>2007-08-06 14:08:25 +0000
commit341281a7d4fad9d37e2f4c0f68d49cd1b1c7e148 (patch)
tree5ba1d39c7df66d494e77d76e11f6f85110614d1f /src/industry_cmd.cpp
parent83a04adb71f5802d03a0b815320e1328306862ca (diff)
downloadopenttd-341281a7d4fad9d37e2f4c0f68d49cd1b1c7e148.tar.xz
(svn r10813) -Fix (r10799): some destructors were performing too much during the pool cleanups, which could cause crashes as already removed pool items could then be dereferenced by other destructors.
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index c46cbac51..a592642dd 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -130,6 +130,8 @@ const IndustryTileSpec *GetIndustryTileSpec(IndustryGfx gfx, bool full_check)
Industry::~Industry()
{
+ if (CleaningPool()) return;
+
/* Industry can also be destroyed when not fully initialized.
* This means that we do not have to clear tiles either. */
if (this->width == 0) {