diff --git a/examples/osganimationtimeline/osganimationtimeline.cpp b/examples/osganimationtimeline/osganimationtimeline.cpp index a429dddb1..b28065376 100644 --- a/examples/osganimationtimeline/osganimationtimeline.cpp +++ b/examples/osganimationtimeline/osganimationtimeline.cpp @@ -177,7 +177,8 @@ int main (int argc, char* argv[]) } osg::ref_ptr tl = new osgAnimation::TimelineAnimationManager(*animationManager); - root->setUpdateCallback(tl); + root->setUpdateCallback(tl.get()); + ExampleTimelineUsage* callback = new ExampleTimelineUsage(tl.get()); root->setEventCallback(callback); root->getUpdateCallback()->addNestedCallback(callback); diff --git a/src/osgPlugins/bvh/ReaderWriterBVH.cpp b/src/osgPlugins/bvh/ReaderWriterBVH.cpp index 52949bd6f..439f316fc 100644 --- a/src/osgPlugins/bvh/ReaderWriterBVH.cpp +++ b/src/osgPlugins/bvh/ReaderWriterBVH.cpp @@ -79,7 +79,7 @@ public: osg::ref_ptr bone = new osgAnimation::Bone( parent->getName()+"End" ); bone->setBindMatrixInBoneSpace( osg::Matrix::translate(offsetEndSite) ); bone->setDataVariance( osg::Object::DYNAMIC ); - parent->addChild( bone ); + parent->addChild( bone.get() ); if ( _drawingFlag ) parent->addChild( createRefGeometry(offsetEndSite, 0.5).get() ); @@ -96,7 +96,7 @@ public: osg::ref_ptr bone = new osgAnimation::Bone( fr[1].getStr() ); bone->setDefaultUpdateCallback(); bone->setDataVariance( osg::Object::DYNAMIC ); - parent->addChild( bone ); + parent->addChild( bone.get() ); _joints.push_back( JointNode(bone, 0) ); int entry = fr[1].getNoNestedBrackets();