1
0
Fork 0

Fix for Martin: tolerate runway-associated navaids with a bogus ICAO/runway ident.

This commit is contained in:
jmt 2009-12-19 17:55:22 +00:00 committed by Tim Moore
parent 9bc4c938d2
commit 718d99f420
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();