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:
parent
fba05c527f
commit
3fb898643e
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Reference in a new issue