From Wang Rui, merged from changeset 12674. "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:28:10 +00:00
parent 73026ea973
commit 373687b72f

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