diff --git a/src/osgPlugins/osgjs/WriteVisitor b/src/osgPlugins/osgjs/WriteVisitor index a129fcbff..7f92ca5b7 100644 --- a/src/osgPlugins/osgjs/WriteVisitor +++ b/src/osgPlugins/osgjs/WriteVisitor @@ -598,7 +598,7 @@ public: osg::ref_ptr json = new JSONNode; osg::Vec3 min(0,0,0), max(0,0,0); - JSONObject *bboxData = new JSONObject; + osg::ref_ptr bboxData = new JSONObject; bool hasBoundindBox = ( node.getUserValue("AABBonBone_min", min) && node.getUserValue("AABBonBone_max", max) ); if (hasBoundindBox) {