From Kim Seokhwan, "Error fix in example/osganimationmorph/osganimationmorph.cpp

in this file,
function,
osg::Geometry* getShape(const std::string& name)
(line 51)

tries to use null pointer when model is not provided.
I added simple comment in attached file."
This commit is contained in:
Robert Osfield 2010-12-20 12:02:50 +00:00
parent 716a00ec59
commit 9818c0fee2

View File

@ -52,8 +52,20 @@ osg::Geometry* getShape(const std::string& name)
{
osg::Node* shape0 = osgDB::readNodeFile(name);
GeometryFinder finder;
/*
shape0->accept(finder);
return finder._geom.get();
*/
//is changed to
if (shape0)
{
shape0->accept(finder);
return finder._geom.get();
}
else
{
return NULL;
}
}