summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-09-25 21:08:45 +0000
committerrubidium <rubidium@openttd.org>2009-09-25 21:08:45 +0000
commit22c4ef6aeeb6fb40237b63bef85b328c3803f529 (patch)
tree39c49bdff35c447141970262bc243abc311c65e1 /src
parent025876aa25ea8211cc0b1cd6f88dd65979bd4d2c (diff)
downloadopenttd-22c4ef6aeeb6fb40237b63bef85b328c3803f529.tar.xz
(svn r17638) -Fix [FS#3235]: Crash when trying to build an industry that has no industry layout defined; yes, it's very similar to r17633 because one case was forgotten.
Diffstat (limited to 'src')
-rw-r--r--src/industry_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index e445308aa..e3a9b1af0 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1943,7 +1943,7 @@ static void MaybeNewIndustry()
ind_spc = GetIndustrySpec(j);
byte chance = ind_spc->appear_ingame[_settings_game.game_creation.landscape];
- if (!ind_spc->enabled || chance == 0) continue;
+ if (!ind_spc->enabled || chance == 0 || ind_spc->num_table == 0) continue;
/* If there is no Callback CBID_INDUSTRY_AVAILABLE or if this one did anot failed,
* and if appearing chance for this landscape is above 0, this industry can be chosen */