summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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 a57e0a1e5..4261425ac 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -1714,7 +1714,7 @@ CommandCost CmdBuildAirport(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (flags & DC_EXEC) {
st = new Station();
- st->town = ClosestTownFromTile(tile, (uint)-1);
+ st->town = t;
GenerateStationName(st, tile, !(afc->flags & AirportFTAClass::AIRPLANES) ? STATIONNAMING_HELIPORT : STATIONNAMING_AIRPORT);
if (IsValidPlayer(_current_player)) {