Added guard to texture image to avoid seg fault when dealing with incomplete databases.

This commit is contained in:
Robert Osfield 2005-03-17 14:40:30 +00:00
parent 6904696573
commit 451a27ac65

View File

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