X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FAirports%2Frunwayprefs.cxx;h=8337d31f9fad3e60c7c8ea5430536fa4fe8bed47;hb=386aefe69358ce41a11c9afeb8f56e26758fe56b;hp=3572275c0d8534d9683e274c5b692c1832fed748;hpb=aa78341698c0ede62bd45d864c1e866d309b420d;p=flightgear.git diff --git a/src/Airports/runwayprefs.cxx b/src/Airports/runwayprefs.cxx index 3572275c0..8337d31f9 100644 --- a/src/Airports/runwayprefs.cxx +++ b/src/Airports/runwayprefs.cxx @@ -26,21 +26,11 @@ #endif #include -//#include #include -//#include -//#include - -//#include -//#include -//#include -//#include -//#include #include #include
-//#include
#include #include "runwayprefs.hxx" @@ -235,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());