X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FATCDCL%2Fground.cxx;h=e5d9c17d5915f0666e1ffa8bbd53fbc9c8cc2f8e;hb=7aba4333a261df723fcbe9eaf86c16af89372595;hp=db7b9abca3e49d54062a0a9d13402e5ad0ff6b53;hpb=70be1629e61d9b751a2f73df30b83bb1be6ca4fe;p=flightgear.git diff --git a/src/ATCDCL/ground.cxx b/src/ATCDCL/ground.cxx index db7b9abca..e5d9c17d5 100644 --- a/src/ATCDCL/ground.cxx +++ b/src/ATCDCL/ground.cxx @@ -362,7 +362,11 @@ void FGGround::DoRwyDetails() { //cout << "GetRwyDetails called" << endl; const FGAirport* apt = fgFindAirportID(ident); - assert(apt); + if (!apt) { + SG_LOG(SG_ATC, SG_WARN, "FGGround::DoRwyDetails: unknown ICAO:" << ident); + return; + } + FGRunway* runway = apt->getActiveRunwayForUsage(); activeRwy = runway->ident(); @@ -376,8 +380,8 @@ void FGGround::DoRwyDetails() { } // move to the +l end/center of the runway //cout << "Runway center is at " << runway._lon << ", " << runway._lat << '\n'; - double tshlon, tshlat, tshr; - double tolon, tolat, tor; + double tshlon = 0.0, tshlat = 0.0, tshr = 0.0; + double tolon = 0.0, tolat = 0.0, tor = 0.0; rwy.length = runway->lengthM(); geo_direct_wgs_84 ( aptElev, runway->latitude(), runway->longitude(), other_way, rwy.length / 2.0 - 25.0, &tshlat, &tshlon, &tshr );