mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-02-04 05:15:21 +00:00
(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.
This commit is contained in:
parent
025876aa25
commit
22c4ef6aee
@ -1943,7 +1943,7 @@ static void MaybeNewIndustry()
|
|||||||
ind_spc = GetIndustrySpec(j);
|
ind_spc = GetIndustrySpec(j);
|
||||||
byte chance = ind_spc->appear_ingame[_settings_game.game_creation.landscape];
|
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,
|
/* 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 */
|
* and if appearing chance for this landscape is above 0, this industry can be chosen */
|
||||||
|
Loading…
Reference in New Issue
Block a user