summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/industry_cmd.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 7e37fd0cf..a59c018b9 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -2137,6 +2137,8 @@ void IndustryBuildData::SetupTargetCount()
total_prob += ibd->probability;
}
+ if (total_prob == 0) return; // No buildable industries.
+
/* Subtract forced industries from the number of industries available for construction. */
total_amount = (total_amount <= force_build) ? 0 : total_amount - force_build;