(svn r1773) -Fix: [ 1114950 ] Game crashed sometimes when there were no industries

in the map
This commit is contained in:
truelight 2005-02-02 19:08:34 +00:00
parent 3f45338cc9
commit 74df79331d

View File

@ -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);
}