summaryrefslogtreecommitdiff
path: root/src/aircraft_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r--src/aircraft_cmd.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp
index 4e76992d6..ebabe544d 100644
--- a/src/aircraft_cmd.cpp
+++ b/src/aircraft_cmd.cpp
@@ -973,10 +973,8 @@ static bool AircraftController(Vehicle *v)
{
int count;
- StationID target = v->u.air.targetairport;
-
/* NULL if station is invalid */
- const Station *st = IsValidStationID(target) ? GetStation(target) : NULL;
+ const Station *st = IsValidStationID(v->u.air.targetairport) ? GetStation(v->u.air.targetairport) : NULL;
/* 0 if there is no station */
TileIndex tile = 0;
if (st != NULL) {