Show
Ignore:
Timestamp:
01/23/09 16:52:10 (5 years ago)
Author:
robert
Message:

From Roland Smeenk, "attached is a small crash fix for the case that a texture is used for transparency without the availability of a diffuse texture."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/dae/daeRMaterials.cpp

    r9529 r9541  
    11651165    if (ctt && ctt->getTexture() != NULL) 
    11661166    { 
    1167         if (strcmp( ctt->getTexture()->getTexture(), diffuseTextureName)) 
     1167        if (!diffuseTextureName || (strcmp( ctt->getTexture()->getTexture(), diffuseTextureName))) 
    11681168        { 
    11691169            osg::notify( osg::WARN ) << "Currently no support for different textures in diffuse and transparent channels." << std::endl; 
     
    11721172    } 
    11731173     
    1174     // Fix up defaults acoording to 1.4.1 release notes 
     1174    // Fix up defaults according to 1.4.1 release notes 
    11751175    domFloat4 f4; 
    11761176    domFx_opaque_enum Opaque = FX_OPAQUE_ENUM_A_ONE;