Avoid a segfault-on-null
This code is called both when there's no ground-net, but also when there's no parking data at all.
This commit is contained in:
parent
b1854459b3
commit
66a6438de1
1 changed files with 4 additions and 2 deletions
|
@ -355,9 +355,11 @@ void FGAIFlightPlan::createDefaultLandingTaxi(FGAIAircraft * ac,
|
|||
pushBackWaypoint(wpt);
|
||||
|
||||
FGParking* parkPos = aAirport->getDynamics()->getParking(gateId);
|
||||
wpt = createOnGround(ac, "ENDtaxi", parkPos->getGeod(), airportElev,
|
||||
if (parkPos) {
|
||||
wpt = createOnGround(ac, "ENDtaxi", parkPos->getGeod(), airportElev,
|
||||
ac->getPerformance()->vTaxi());
|
||||
pushBackWaypoint(wpt);
|
||||
pushBackWaypoint(wpt);
|
||||
}
|
||||
}
|
||||
|
||||
bool FGAIFlightPlan::createLandingTaxi(FGAIAircraft * ac, FGAirport * apt,
|
||||
|
|
Loading…
Add table
Reference in a new issue