diff --git a/src/osgPlugins/dae/daeRMaterials.cpp b/src/osgPlugins/dae/daeRMaterials.cpp index c46c98e68..d3195ab61 100644 --- a/src/osgPlugins/dae/daeRMaterials.cpp +++ b/src/osgPlugins/dae/daeRMaterials.cpp @@ -618,7 +618,7 @@ bool daeReader::processColorOrTextureType(const osg::StateSet* ss, else if (cot->getParam() != NULL) { domFloat4 f4; - if (GetFloat4Param(cot->getParam()->getRef(), f4)) + if (cot->getParam()->getRef() != 0 && GetFloat4Param(cot->getParam()->getRef(), f4)) { mat->setAmbient( osg::Material::FRONT_AND_BACK, osg::Vec4( f4[0], f4[1], f4[2], f4[3] ) ); retVal = true;