From Farshid Lashkari, "fix for the Collada loader to check for some NULL attributes."
This commit is contained in:
parent
c2520a8533
commit
5d9dcfccbf
@ -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;
|
||||
}
|
||||
|
||||
_texCoordSetMap[TextureToCoordSetMap::key_type(ss, tuu)] = tex->getTexcoord();
|
||||
if(tex->getTexcoord() != NULL)
|
||||
{
|
||||
_texCoordSetMap[TextureToCoordSetMap::key_type(ss, tuu)] = tex->getTexcoord();
|
||||
}
|
||||
|
||||
return t2D;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user