@@ -1824,9 +1824,8 @@ CommandCost CmdBuildIndustry(TileIndex t
if (ret.Failed()) return ret;
}
if (flags & DC_EXEC) {
assert(ind != NULL);
if (_game_mode != GM_EDITOR) {
if ((flags & DC_EXEC) && ind != NULL && _game_mode != GM_EDITOR) {
/* Created a new industry in-game, advertise the event. */
SetDParam(0, indspec->name);
if (indspec->new_industry_text > STR_LAST_STRINGID) {
SetDParam(1, STR_TOWN_NAME);
@@ -1837,7 +1836,6 @@ CommandCost CmdBuildIndustry(TileIndex t
AddIndustryNewsItem(indspec->new_industry_text, NS_INDUSTRY_OPEN, ind->index);
AI::BroadcastNewEvent(new AIEventIndustryOpen(ind->index));
return CommandCost(EXPENSES_OTHER, indspec->GetConstructionCost());
Status change: