From Cedric Pinson, "I have tried some model that produces crashes in the dae plugin because
of empty node: if (GetFloat4Param(cot->getParam()->getRef(), f4)) {...} in the model I have tested cot->getParam()->getRef() return 0x0 and make it crahes inside GetFloat4Param. I have added a test before calling GetFloat4Param if (cot->getParam()->getRef() != 0 && GetFloat4Param(cot->getParam()->getRef(), f4)) {...} "
This commit is contained in:
parent
9bfb043a16
commit
cd44e63b90
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user