(svn r14383) -Fix [FS#2316](r14343): handle invalid 'v->u.air.targetairport' in the NewGRF code, too

This commit is contained in:
smatz
2008-09-22 14:34:38 +00:00
parent 7ef5406946
commit abbc9cd9cb
2 changed files with 23 additions and 20 deletions

View File

@@ -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) {