marker beacon: catch NULL pointer
when runway not in navdb (affects incomplete/inconsistent nav data only).
This commit is contained in:
parent
cabb17818f
commit
2f7f5da4ad
1 changed files with 5 additions and 0 deletions
|
@ -51,6 +51,11 @@ FGMarkerBeaconRecord::create(int aTy, const string& aName, const SGGeod& aPos)
|
|||
{
|
||||
Type fgpTy = mapType(aTy);
|
||||
FGRunway* runway = getRunwayFromName(aName);
|
||||
if (!runway)
|
||||
{
|
||||
SG_LOG(SG_GENERAL, SG_ALERT, "Failed to create beacon for unknown runway '" << aName << "'.");
|
||||
return NULL;
|
||||
}
|
||||
SGGeod pos(aPos);
|
||||
// fudge elevation to the runway elevation if it's not specified
|
||||
if (fabs(pos.getElevationFt()) < 0.01) {
|
||||
|
|
Loading…
Add table
Reference in a new issue