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.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index 846f3c9cc..e16d5b261 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1708,12 +1708,12 @@ static Industry *CreateNewIndustryHelper(TileIndex tile, IndustryType type, DoCo
if (ret.Failed()) return NULL;
if (HasBit(GetIndustrySpec(type)->callback_mask, CBM_IND_LOCATION)) {
- if (!CheckIfCallBackAllowsCreation(tile, type, itspec_index, seed)) return NULL;
+ ret = CheckIfCallBackAllowsCreation(tile, type, itspec_index, seed);
} else {
ret = _check_new_industry_procs[indspec->check_proc](tile);
- ret.SetGlobalErrorMessage();
- if (ret.Failed()) return NULL;
}
+ ret.SetGlobalErrorMessage();
+ if (ret.Failed()) return NULL;
if (!custom_shape_check && _settings_game.game_creation.land_generator == LG_TERRAGENESIS && _generating_world && !_ignore_restrictions && !CheckIfCanLevelIndustryPlatform(tile, DC_NO_WATER, it, type)) return NULL;
ret = CheckIfFarEnoughFromIndustry(tile, type);