#548: segfault in AIFlightPlanCreate
check "tn != NULL" before calling tn->getGeod()
This commit is contained in:
parent
bc9331fc3f
commit
11a9bdf29e
1 changed files with 1 additions and 2 deletions
|
@ -968,9 +968,8 @@ bool FGAIFlightPlan::createLanding(FGAIAircraft * ac, FGAirport * apt,
|
||||||
}
|
}
|
||||||
if (tn)
|
if (tn)
|
||||||
tn = gn->findNode(nodeId);
|
tn = gn->findNode(nodeId);
|
||||||
else {
|
if (!tn)
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
double dist = SGGeodesy::distanceM(coord, tn->getGeod());
|
double dist = SGGeodesy::distanceM(coord, tn->getGeod());
|
||||||
if (dist < (min + 0.75)) {
|
if (dist < (min + 0.75)) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue