From 2de3f08fd370fbf1f216deaa96bed43818a823dc Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Tue, 28 Jun 2011 07:22:09 +0000 Subject: [PATCH] From Wang Rui, "I've found a small problem which causes crashes in the 3ds plugin while trying to load a model. The fix here will ensure that the texture map is valid and everything could work well then." --- src/osgPlugins/3ds/ReaderWriter3DS.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgPlugins/3ds/ReaderWriter3DS.cpp b/src/osgPlugins/3ds/ReaderWriter3DS.cpp index 3956ceb3a..c034b5404 100644 --- a/src/osgPlugins/3ds/ReaderWriter3DS.cpp +++ b/src/osgPlugins/3ds/ReaderWriter3DS.cpp @@ -1141,7 +1141,7 @@ ReaderWriter3DS::StateSetInfo ReaderWriter3DS::ReaderObject::createStateSet(Lib3 // opacity osg::Texture* opacity_map = createTexture(&(mat->opacity_map),"opacity_map", textureTransparency); - if (opacity_map) + if (opacity_map && texture1_map) { if(texture1_map->getImage()->isImageTranslucent()) {