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:
parent
716a00ec59
commit
9818c0fee2
@ -52,8 +52,20 @@ osg::Geometry* getShape(const std::string& name)
|
|||||||
{
|
{
|
||||||
osg::Node* shape0 = osgDB::readNodeFile(name);
|
osg::Node* shape0 = osgDB::readNodeFile(name);
|
||||||
GeometryFinder finder;
|
GeometryFinder finder;
|
||||||
|
/*
|
||||||
shape0->accept(finder);
|
shape0->accept(finder);
|
||||||
return finder._geom.get();
|
return finder._geom.get();
|
||||||
|
*/
|
||||||
|
//is changed to
|
||||||
|
if (shape0)
|
||||||
|
{
|
||||||
|
shape0->accept(finder);
|
||||||
|
return finder._geom.get();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user