]> git.mxchange.org Git - simgear.git/commitdiff
Avoid spitting gazillion 'Cannot find image file "" ' message on the console while...
authorfredb <fredb>
Sat, 12 Jan 2008 08:50:21 +0000 (08:50 +0000)
committerfredb <fredb>
Sat, 12 Jan 2008 08:50:21 +0000 (08:50 +0000)
simgear/scene/model/ModelRegistry.cxx

index a4cef6abab10f086dbd586edb99e2cb24f98f302..5d123109d6fd02b2bd55f15c962e2845d9a67b01 100644 (file)
@@ -100,8 +100,8 @@ public:
     string fileName = getSimpleFileName(fullFilePath);
     // The name that should be found with the current database path
     string fullLiveryFile = findFileInPath(fileName, mPathList);
-    // If they are identical then there is nothing to do
-    if (fullLiveryFile == fullFilePath)
+    // If it is empty or they are identical then there is nothing to do
+    if (fullLiveryFile.empty() || fullLiveryFile == fullFilePath)
       return 0;
 
     image = readImageFile(fullLiveryFile);