From 5d9dcfccbf27bc02976b036b78ad5c6b0afae0f0 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 27 Oct 2017 13:17:47 +0100 Subject: [PATCH] From Farshid Lashkari, "fix for the Collada loader to check for some NULL attributes." --- src/osgPlugins/dae/daeRMaterials.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/dae/daeRMaterials.cpp b/src/osgPlugins/dae/daeRMaterials.cpp index 158ca35ef..2aae4e366 100644 --- a/src/osgPlugins/dae/daeRMaterials.cpp +++ b/src/osgPlugins/dae/daeRMaterials.cpp @@ -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("<getTexcoord(); + if(tex->getTexcoord() != NULL) + { + _texCoordSetMap[TextureToCoordSetMap::key_type(ss, tuu)] = tex->getTexcoord(); + } return t2D; }