From Farshid Lashkari, "fix for the Collada loader to check for some NULL attributes."

This commit is contained in:
Robert Osfield 2017-10-27 13:17:47 +01:00
parent c2520a8533
commit 5d9dcfccbf

View File

@ -1017,6 +1017,11 @@ osg::Texture2D* daeReader::processTexture(
domFx_surface_common *surface = NULL;
domImage *dImg = NULL;
if(tex->getTexture() == NULL)
{
return NULL;
}
std::string target = std::string("./") + std::string(tex->getTexture());
OSG_INFO<<"processTexture("<<target<<")"<<std::endl;
@ -1159,7 +1164,10 @@ osg::Texture2D* daeReader::processTexture(
_textureParamMap[parameters] = t2D;
}
if(tex->getTexcoord() != NULL)
{
_texCoordSetMap[TextureToCoordSetMap::key_type(ss, tuu)] = tex->getTexcoord();
}
return t2D;
}