From 8545fa51984a5d6da5c39b27d40b34fe47a034bc Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 17 Mar 2005 08:54:23 +0000 Subject: [PATCH] Added if (image ..) check to prevent seg fault on imcomplete models --- examples/osgconv/osgconv.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/osgconv/osgconv.cpp b/examples/osgconv/osgconv.cpp index d564ad7ac..819d11bea 100644 --- a/examples/osgconv/osgconv.cpp +++ b/examples/osgconv/osgconv.cpp @@ -231,7 +231,7 @@ public: for (unsigned int im=0;imgetNumImages();++im) { osg::Image* image = texture->getImage(im); - if (image->isImageTranslucent()) hasTranslucentTexture = true; + if (image && image->isImageTranslucent()) hasTranslucentTexture = true; } } }