1
0
Fork 0

Candidate fix for bug #118, crash with custom (scenery) airport data.

This commit is contained in:
jmt 2010-04-07 22:27:39 +00:00 committed by Tim Moore
parent 89023eda69
commit 40b2c3b9f7

View file

@ -225,7 +225,13 @@ void RunwayGroup::setActive(const FGAirport* airport,
validSelection = true;
for (int j = 0; j < activeRwys; j++)
{
rwy = airport->getRunwayByIdent(rwyList[j].getRwyList(i));
string ident(rwyList[j].getRwyList(i));
if (!airport->hasRunwayWithIdent(ident)) {
SG_LOG(SG_GENERAL, SG_WARN, "no such runway:" << ident << " at " << airport->ident());
continue;
}
rwy = airport->getRunwayByIdent(ident);
//cerr << "Succes" << endl;
hdgDiff = fabs(windHeading - rwy->headingDeg());