1
0
Fork 0

Merge branch 'jmt/navaid'

This commit is contained in:
Tim Moore 2010-01-11 23:55:17 +01:00
commit b61f8fba33
2 changed files with 5 additions and 3 deletions

View file

@ -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]);
}

View file

@ -91,6 +91,9 @@ void FGNavRecord::initAirportRelation()
}
mRunway = getRunwayFromName(_name);
if (!mRunway) {
return;
}
if (type() != GS) {
readAirportSceneryData();