diff options
author | smatz <smatz@openttd.org> | 2008-09-22 14:34:38 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-09-22 14:34:38 +0000 |
commit | abbc9cd9cbdfbc2e0fb294f1664b59cf9fab5ae6 (patch) | |
tree | 164aa2e2e1b217e6e796a3327ee75999b2e01ed8 /src/aircraft_cmd.cpp | |
parent | 7ef54069462d5aca6a995c84bcdb115fb5ad66bb (diff) | |
download | openttd-abbc9cd9cbdfbc2e0fb294f1664b59cf9fab5ae6.tar.xz |
(svn r14383) -Fix [FS#2316](r14343): handle invalid 'v->u.air.targetairport' in the NewGRF code, too
Diffstat (limited to 'src/aircraft_cmd.cpp')
-rw-r--r-- | src/aircraft_cmd.cpp | 4 |
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) { |