diff --git a/simgear/scene/tgdb/TileEntry.cxx b/simgear/scene/tgdb/TileEntry.cxx index 41f9dedd..76416a26 100644 --- a/simgear/scene/tgdb/TileEntry.cxx +++ b/simgear/scene/tgdb/TileEntry.cxx @@ -265,7 +265,9 @@ TileEntry::loadTileByFileName(const string& fileName, osgDB::FilePathList path_list=options->getDatabasePathList(); // Make sure we find the original filename here... - path_list.push_front(osgDB::getFilePath(fileName)); + std::string filePath = osgDB::getFilePath(fileName); + if (!filePath.empty()) + path_list.push_front(filePath); // scan and parse all files and store information for (unsigned int i = 0; i < path_list.size(); i++) {