]> git.mxchange.org Git - flightgear.git/blobdiff - src/ATC/ATCutils.cxx
Mathias Fröhlich:
[flightgear.git] / src / ATC / ATCutils.cxx
index b209a57fff78bd34c1b3b708d0e96ae5de8efd29..14442917e408620d1d5ba7da8125be16b950b7ca 100644 (file)
@@ -292,22 +292,22 @@ double GetAngleDiff_deg( const double &a1, const double &a2) {
 // in fg_init.cxx, and are just here temporarily until some rationalisation occurs.
 // find basic airport location info from airport database
 bool dclFindAirportID( const string& id, FGAirport *a ) {
-    FGAirport result;
+    const FGAirport* result;
 
     if ( id.length() ) {
         SG_LOG( SG_GENERAL, SG_INFO, "Searching for airport code = " << id );
 
-        result = globals->get_airports()->search( id );
-        if ( result.getId().empty() ) {
+        result = globals->get_airports()->search(id);
+        if ( result == NULL ) {
             SG_LOG( SG_GENERAL, SG_WARN,
-                    "Failed to find " << id << " in basic.dat.gz" );
+                    "Failed to find " << id << " in apt.dat.gz" );
             return false;
         }
     } else {
         return false;
     }
 
-    *a = result;
+    *a = *result;
 
     SG_LOG( SG_GENERAL, SG_INFO,
             "Position for " << id << " is ("