summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--industry_cmd.c2
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);
}