From 701c4bcf27716af237e82e07b0ccd2be0b7fdbff Mon Sep 17 00:00:00 2001 From: fredb Date: Sat, 12 Jan 2008 08:50:21 +0000 Subject: [PATCH] Avoid spitting gazillion 'Cannot find image file "" ' message on the console while loading random objects --- simgear/scene/model/ModelRegistry.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simgear/scene/model/ModelRegistry.cxx b/simgear/scene/model/ModelRegistry.cxx index a4cef6ab..5d123109 100644 --- a/simgear/scene/model/ModelRegistry.cxx +++ b/simgear/scene/model/ModelRegistry.cxx @@ -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); -- 2.39.5