diff options
author | truelight <truelight@openttd.org> | 2005-02-02 19:08:34 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2005-02-02 19:08:34 +0000 |
commit | 74df79331dfb23fc73426ac52ef5129586f0150b (patch) | |
tree | c1039a1abe128e1afcc2efb27f97a08cc5f143ed | |
parent | 3f45338cc9118e86012ceaa0114e5d501d807c08 (diff) | |
download | openttd-74df79331dfb23fc73426ac52ef5129586f0150b.tar.xz |
(svn r1773) -Fix: [ 1114950 ] Game crashed sometimes when there were no industries
in the map
-rw-r--r-- | industry_cmd.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/industry_cmd.c b/industry_cmd.c index 88a8d605d..865d0e02d 100644 --- a/industry_cmd.c +++ b/industry_cmd.c @@ -1860,7 +1860,7 @@ void IndustryMonthlyLoop(void) /* 3% chance that we start a new industry */ if (CHANCE16(3, 100)) { MaybeNewIndustry(Random()); - } else if (!_patches.smooth_economy) { + } else if (!_patches.smooth_economy && _total_industries > 0) { i = GetIndustry(RandomRange(_total_industries)); MaybeCloseIndustry(i); } |