diff --git a/src/osgPlugins/osgjs/WriteVisitor.cpp b/src/osgPlugins/osgjs/WriteVisitor.cpp index 0c922139e..aa6fc29ca 100644 --- a/src/osgPlugins/osgjs/WriteVisitor.cpp +++ b/src/osgPlugins/osgjs/WriteVisitor.cpp @@ -644,7 +644,7 @@ JSONObject* WriteVisitor::createJSONMorphGeometry(osgAnimation::MorphGeometry* m } JSONObject* jsonGeometry = createJSONGeometry(morphGeometry, parent); - JSONArray* targetList = new JSONArray; + osg::ref_ptr targetList = new JSONArray; osgAnimation::MorphGeometry::MorphTargetList mTargetList = morphGeometry->getMorphTargetList(); typedef osgAnimation::MorphGeometry::MorphTargetList::iterator TargetIterator;