summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2008-12-26 19:37:50 +0000
committersmatz <smatz@openttd.org>2008-12-26 19:37:50 +0000
commit7fbd5beb0f92c6f53b4b8d9206773003328b2e7d (patch)
treed4bd34c6215ede747794b7a5273d6a5c6d3390c8 /src/industry_cmd.cpp
parent047e40d33ff1b5b0d407dda7e73d34430e268494 (diff)
downloadopenttd-7fbd5beb0f92c6f53b4b8d9206773003328b2e7d.tar.xz
(svn r14746) -Fix: don't let any disaster vehicle (Helicopter or Airplane) target invalid industry
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index a9a837dbe..543c21654 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -166,6 +166,9 @@ Industry::~Industry()
} END_TILE_LOOP(tile_cur, 42, 42, this->xy - TileDiff(21, 21))
}
+ /* don't let any disaster vehicle target invalid industry */
+ ReleaseDisastersTargetingIndustry(this->index);
+
DecIndustryTypeCount(this->type);
DeleteSubsidyWithIndustry(this->index);