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."
This commit is contained in:
Robert Osfield
2011-06-28 07:22:09 +00:00
parent e1bae2701a
commit 2de3f08fd3

View File

@@ -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())
{