TrafficL Avoid crash on invalid active runway
Work-around + log message when the AI flight has an invalid arrival runway.
This commit is contained in:
parent
dab9e6ba5f
commit
f72983e1a6
1 changed files with 5 additions and 0 deletions
|
@ -989,6 +989,11 @@ bool FGAIFlightPlan::createLanding(FGAIAircraft * ac, FGAirport * apt,
|
|||
double decelMetric = decel * SG_KT_TO_MPS;
|
||||
|
||||
char buffer[12];
|
||||
if (!apt->hasRunwayWithIdent(activeRunway)) {
|
||||
SG_LOG(SG_AI, SG_WARN, "FGAIFlightPlan::createLanding: No such runway " << activeRunway << " at " << apt->ident());
|
||||
return false;
|
||||
}
|
||||
|
||||
FGRunway * rwy = apt->getRunwayByIdent(activeRunway);
|
||||
if (!rwy)
|
||||
return false;
|
||||
|
|
Loading…
Reference in a new issue