From 74df79331dfb23fc73426ac52ef5129586f0150b Mon Sep 17 00:00:00 2001 From: truelight Date: Wed, 2 Feb 2005 19:08:34 +0000 Subject: (svn r1773) -Fix: [ 1114950 ] Game crashed sometimes when there were no industries in the map --- industry_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'industry_cmd.c') 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); } -- cgit v1.2.3-54-g00ecf