diff --git a/simgear/scene/material/TextureBuilder.cxx b/simgear/scene/material/TextureBuilder.cxx index 0c141c47..ad3ad569 100644 --- a/simgear/scene/material/TextureBuilder.cxx +++ b/simgear/scene/material/TextureBuilder.cxx @@ -216,11 +216,14 @@ TexTuple makeTexTuple(Effect* effect, const SGPropertyNode* props, if (pImage) { imageName = pImage->getStringValue(); - absFileName = SGModelLib::findDataFile(imageName, options); - if (absFileName.empty()) + if (!imageName.empty()) { - SG_LOG(SG_INPUT, SG_ALERT, "Texture file not found: '" - << imageName << "'"); + absFileName = SGModelLib::findDataFile(imageName, options); + if (absFileName.empty()) + { + SG_LOG(SG_INPUT, SG_ALERT, "Texture file not found: '" + << imageName << "'"); + } } }