diff options
author | rubidium <rubidium@openttd.org> | 2007-06-15 08:05:24 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-06-15 08:05:24 +0000 |
commit | 3efca64a94205f589d03cbe7ca2e79ba5c81002f (patch) | |
tree | b62c9a5927136dec8c578dfd3ad9ea5c7d7333c0 /src/newgrf_engine.cpp | |
parent | dcface1b3b80c9f4d660c6c0109a9bddaa5dce1e (diff) | |
download | openttd-3efca64a94205f589d03cbe7ca2e79ba5c81002f.tar.xz |
(svn r10165) -Fix [FS#874]: crash when trying to get the aircraft movement state of an aircraft going to a just deleted airport.
Diffstat (limited to 'src/newgrf_engine.cpp')
-rw-r--r-- | src/newgrf_engine.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/newgrf_engine.cpp b/src/newgrf_engine.cpp index 5b9422a75..7a3e980eb 100644 --- a/src/newgrf_engine.cpp +++ b/src/newgrf_engine.cpp @@ -245,6 +245,8 @@ enum { static byte MapAircraftMovementState(const Vehicle *v) { const Station *st = GetStation(v->u.air.targetairport); + if (st->airport_tile == 0) return AMS_TTDP_FLIGHT_TO_TOWER; + const AirportFTAClass *afc = st->Airport(); uint16 amdflag = afc->MovingData(v->u.air.pos)->flag; |