Merge branch 'jmt/navaid'
This commit is contained in:
commit
b61f8fba33
2 changed files with 5 additions and 3 deletions
|
@ -240,11 +240,10 @@ FGRunway* getRunwayFromName(const std::string& aName)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
FGRunway* runway = apt->getRunwayByIdent(parts[1]);
|
||||
if (!runway) {
|
||||
if (!apt->hasRunwayWithIdent(parts[1])) {
|
||||
SG_LOG(SG_GENERAL, SG_WARN, "navaid " << aName << " associated with bogus runway ID:" << parts[1]);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return runway;
|
||||
return apt->getRunwayByIdent(parts[1]);
|
||||
}
|
||||
|
|
|
@ -91,6 +91,9 @@ void FGNavRecord::initAirportRelation()
|
|||
}
|
||||
|
||||
mRunway = getRunwayFromName(_name);
|
||||
if (!mRunway) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (type() != GS) {
|
||||
readAirportSceneryData();
|
||||
|
|
Loading…
Reference in a new issue