summaryrefslogtreecommitdiff
path: root/src/industry_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r--src/industry_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 88cdf7a09..768584d33 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1872,6 +1872,9 @@ static void MaybeNewIndustry(void)
}
}
+ /* Abort if there is no industry buildable */
+ if (probability_max == 0) return;
+
/* Find a random type, with maximum being what has been evaluate above*/
rndtype = RandomRange(probability_max);
for (j = 0; j < NUM_INDUSTRYTYPES; j++) {