summaryrefslogtreecommitdiff
path: root/src/station_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r--src/station_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index f603c4e15..7cb577767 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -2345,7 +2345,7 @@ CommandCost CmdOpenCloseAirport(TileIndex tile, DoCommandFlag flags, uint32 p1,
if (!Station::IsValidID(p1)) return CMD_ERROR;
Station *st = Station::Get(p1);
- if (!(st->facilities & FACIL_AIRPORT)) return CMD_ERROR;
+ if (!(st->facilities & FACIL_AIRPORT) || st->owner == OWNER_NONE) return CMD_ERROR;
CommandCost ret = CheckOwnership(st->owner);
if (ret.Failed()) return ret;