From acdebc99bc7bd141ad29b4e469b59f20a66958db Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 8 Jan 2014 10:32:58 +0000 Subject: [PATCH] From Farshid Lashkari, "I've attached a fix for the Collada loader that prevents a crash with some files containing textures. I also converted an OSG_NOTICE to OSG_INFO to be consistent with other log messages within the loader." --- src/osgPlugins/dae/daeRMaterials.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/dae/daeRMaterials.cpp b/src/osgPlugins/dae/daeRMaterials.cpp index a85cc9a8f..9e7e216f7 100644 --- a/src/osgPlugins/dae/daeRMaterials.cpp +++ b/src/osgPlugins/dae/daeRMaterials.cpp @@ -1004,7 +1004,7 @@ osg::Texture2D* daeReader::processTexture( domImage *dImg = NULL; std::string target = std::string("./") + std::string(tex->getTexture()); - OSG_NOTICE<<"processTexture("<getSource() == NULL ) + { + OSG_WARN << "Could not locate source for sampler2D" << std::endl; + return NULL; + } + //find the newparam for the surface based on the sampler2D->source value target = std::string("./") + std::string( sampler->getSource()->getValue() ); daeSIDResolver res2( _currentEffect, target.c_str() );