From 487c2b5f679a9e378e32825a2dc9f31bd1653673 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 10 Dec 2014 11:29:54 +0000 Subject: [PATCH] From Farshid Lashkari, "The Collada loader would crash while processing textures on certain files. I've attached the fix." git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14595 16af8721-9629-0410-8352-f15c8da7e697 --- src/osgPlugins/dae/daeRMaterials.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/osgPlugins/dae/daeRMaterials.cpp b/src/osgPlugins/dae/daeRMaterials.cpp index bedec1a95..48d756610 100644 --- a/src/osgPlugins/dae/daeRMaterials.cpp +++ b/src/osgPlugins/dae/daeRMaterials.cpp @@ -1048,7 +1048,7 @@ osg::Texture2D* daeReader::processTexture( return NULL; } - if (sampler->getSource() == NULL ) + if (sampler->getSource() == NULL || sampler->getSource()->getValue() == NULL) { OSG_WARN << "Could not locate source for sampler2D" << std::endl; return NULL;