summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/station_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp
index 58ffc5ef3..0bb5ff0b9 100644
--- a/src/station_cmd.cpp
+++ b/src/station_cmd.cpp
@@ -56,6 +56,9 @@ bool IsHangar(TileIndex t)
{
assert(IsTileType(t, MP_STATION));
+ /* If the tile isn't an airport there's no chance it's a hangar. */
+ if (!IsAirport(t)) return false;
+
const Station *st = Station::GetByTile(t);
const AirportFTAClass *apc = st->Airport();