diff --git a/src/osgAnimation/MorphGeometry.cpp b/src/osgAnimation/MorphGeometry.cpp index 6fc7b0a39..f195e6833 100644 --- a/src/osgAnimation/MorphGeometry.cpp +++ b/src/osgAnimation/MorphGeometry.cpp @@ -75,7 +75,7 @@ void MorphGeometry::transformSoftwareMethod() // See if we have an internal optimized geometry osg::Geometry* morphGeometry = this; if (_internalOptimizedGeometry.valid()) - morphGeometry = _internalOptimizedGeometry; + morphGeometry = _internalOptimizedGeometry.get(); osg::Vec3Array* pos = dynamic_cast(morphGeometry->getVertexArray()); if (pos && _positionSource.size() != pos->size()) diff --git a/src/osgPlugins/osgAnimation/ReaderWriter.cpp b/src/osgPlugins/osgAnimation/ReaderWriter.cpp index b9b054a34..2f0b8f0f4 100644 --- a/src/osgPlugins/osgAnimation/ReaderWriter.cpp +++ b/src/osgPlugins/osgAnimation/ReaderWriter.cpp @@ -593,7 +593,7 @@ bool Animation_writeLocalData(const Object& obj, Output& fw) fw.indent() << "num_channels " << anim.getChannels().size() << std::endl; for (unsigned int i = 0; i < anim.getChannels().size(); i++) { - osgAnimation::Channel* pChannel = anim.getChannels()[i]; + osgAnimation::Channel* pChannel = anim.getChannels()[i].get(); osgAnimation::DoubleLinearChannel* pDlc = dynamic_cast(pChannel); if (pDlc)