Added if (image ..) check to prevent seg fault on imcomplete models

This commit is contained in:
Robert Osfield
2005-03-17 08:54:23 +00:00
parent 033fe70f9a
commit 8545fa5198

View File

@@ -231,7 +231,7 @@ public:
for (unsigned int im=0;im<texture->getNumImages();++im)
{
osg::Image* image = texture->getImage(im);
if (image->isImageTranslucent()) hasTranslucentTexture = true;
if (image && image->isImageTranslucent()) hasTranslucentTexture = true;
}
}
}