1
0
Fork 0

#548: segfault in AIFlightPlanCreate

check "tn != NULL" before calling tn->getGeod()
This commit is contained in:
ThorstenB 2012-03-25 10:34:07 +02:00
parent bc9331fc3f
commit 11a9bdf29e

View file

@ -968,9 +968,8 @@ bool FGAIFlightPlan::createLanding(FGAIAircraft * ac, FGAirport * apt,
}
if (tn)
tn = gn->findNode(nodeId);
else {
if (!tn)
break;
}
double dist = SGGeodesy::distanceM(coord, tn->getGeod());
if (dist < (min + 0.75)) {