// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
//
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
+
#include <simgear/misc/sg_path.hxx>
#include <simgear/xml/easyxml.hxx>
#include <simgear/misc/strutils.hxx>
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;
}