diff --git a/src/osgPlugins/gles/DrawArrayVisitor b/src/osgPlugins/gles/DrawArrayVisitor index 332d21ced..7c101bb60 100644 --- a/src/osgPlugins/gles/DrawArrayVisitor +++ b/src/osgPlugins/gles/DrawArrayVisitor @@ -26,7 +26,7 @@ public: GeometryArrayList srcArrays(geometry); // clone but clear content - osg::Geometry* newGeometry = new osg::Geometry; + osg::ref_ptr newGeometry = new osg::Geometry; GeometryArrayList dst = srcArrays.cloneType(); for (unsigned int i = 0; i < geometry.getNumPrimitiveSets(); i++) {