mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-07 22:51:55 +00:00
(svn r10165) -Fix [FS#874]: crash when trying to get the aircraft movement state of an aircraft going to a just deleted airport.
This commit is contained in:
parent
54fbad017e
commit
d6267f5539
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user