From 88ce4a37865509a3aff3b4b01c8ade633cd22312 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 23 Jan 2009 15:52:10 +0000 Subject: [PATCH] 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." --- src/osgPlugins/dae/daeRMaterials.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/osgPlugins/dae/daeRMaterials.cpp b/src/osgPlugins/dae/daeRMaterials.cpp index ce629e703..ecdf2f1be 100644 --- a/src/osgPlugins/dae/daeRMaterials.cpp +++ b/src/osgPlugins/dae/daeRMaterials.cpp @@ -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)