]> git.mxchange.org Git - flightgear.git/blobdiff - src/Airports/xmlloader.cxx
Several Bugfixes:
[flightgear.git] / src / Airports / xmlloader.cxx
index 3d65f7756611241764dab8025d71da53682c44d1..273e2f67f6508c772760a825196f82f4773e3d01 100644 (file)
@@ -96,13 +96,16 @@ bool XMLLoader::findAirportData(const std::string& aICAO,
     aICAO.c_str(), fileName.c_str());
 
   for (string_list_iterator it = sc.begin(); it != sc.end(); ++it) {
-    SGPath path(*it);
-    path.append("Airports");
-    path.append(string(buffer));
-    if (path.exists()) {
-      aPath = path;
-      return true;
-    } // of path exists
+    // fg_senery contains empty strings as "markers" (see FGGlobals::set_fg_scenery)
+    if (!it->empty()) {
+        SGPath path(*it);
+        path.append("Airports");
+        path.append(string(buffer));
+        if (path.exists()) {
+          aPath = path;
+          return true;
+        } // of path exists
+    }
   } // of scenery path iteration
   return false;
 }