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."

This commit is contained in:
Robert Osfield
2009-01-23 15:52:10 +00:00
parent e0c279bf3d
commit 88ce4a3786

View File

@@ -1164,14 +1164,14 @@ void daeReader::processTransparencySettings( domCommon_transparent_type *ctt,
if (ctt && ctt->getTexture() != NULL)
{
if (strcmp( ctt->getTexture()->getTexture(), diffuseTextureName))
if (!diffuseTextureName || (strcmp( ctt->getTexture()->getTexture(), diffuseTextureName)))
{
osg::notify( osg::WARN ) << "Currently no support for different textures in diffuse and transparent channels." << std::endl;
return;
}
}
// Fix up defaults acoording to 1.4.1 release notes
// Fix up defaults according to 1.4.1 release notes
domFloat4 f4;
domFx_opaque_enum Opaque = FX_OPAQUE_ENUM_A_ONE;
if (NULL == ctt)