1
0
Fork 0

Bugfix: don't crash on localizers with no associated runway (due to inconsistent nav.dat/apt.dat). Reported by Jacob Burbach.

This commit is contained in:
jmt 2010-02-15 22:52:12 +00:00 committed by Tim Moore
parent fba05c527f
commit 3fb898643e

View file

@ -917,7 +917,10 @@ void FGNavRadio::search()
double FGNavRadio::localizerWidth(FGNavRecord* aLOC)
{
FGRunway* rwy = aLOC->runway();
assert(rwy);
if (!rwy) {
return 6.0; // no runway associated, return default value
}
SGVec3d thresholdCart(SGVec3d::fromGeod(rwy->threshold()));
double axisLength = dist(aLOC->cart(), thresholdCart);