Show
Ignore:
Timestamp:
12/20/10 13:02:50 (3 years ago)
Author:
robert
Message:

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."

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/examples/osganimationmorph/osganimationmorph.cpp

    r11338 r12046  
    5353    osg::Node* shape0 = osgDB::readNodeFile(name); 
    5454    GeometryFinder finder; 
     55    /* 
    5556    shape0->accept(finder); 
    5657    return finder._geom.get(); 
     58    */ 
     59    //is changed to 
     60    if (shape0) 
     61    { 
     62        shape0->accept(finder); 
     63        return finder._geom.get(); 
     64    } 
     65    else 
     66    { 
     67        return NULL; 
     68    } 
    5769} 
    5870