From 5de24552a8aa275931e8bca71d78bc5bcf2f3a77 Mon Sep 17 00:00:00 2001 From: scrawl Date: Tue, 26 May 2015 19:12:29 +0200 Subject: [PATCH] Leak fix --- components/sceneutil/riggeometry.cpp | 4 +++- components/sceneutil/riggeometry.hpp | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/components/sceneutil/riggeometry.cpp b/components/sceneutil/riggeometry.cpp index dd6b9a499..2a67c6ce6 100644 --- a/components/sceneutil/riggeometry.cpp +++ b/components/sceneutil/riggeometry.cpp @@ -59,7 +59,8 @@ public: }; RigGeometry::RigGeometry() - : mFirstFrame(true) + : mSkeleton(NULL) + , mFirstFrame(true) , mBoundsFirstFrame(true) { setCullCallback(new UpdateRigGeometry); @@ -69,6 +70,7 @@ RigGeometry::RigGeometry() RigGeometry::RigGeometry(const RigGeometry ©, const osg::CopyOp ©op) : osg::Geometry(copy, copyop) + , mSkeleton(NULL) , mInfluenceMap(copy.mInfluenceMap) , mFirstFrame(copy.mFirstFrame) , mBoundsFirstFrame(copy.mBoundsFirstFrame) diff --git a/components/sceneutil/riggeometry.hpp b/components/sceneutil/riggeometry.hpp index ea4245aa8..bd7c586c4 100644 --- a/components/sceneutil/riggeometry.hpp +++ b/components/sceneutil/riggeometry.hpp @@ -46,7 +46,7 @@ namespace SceneUtil private: osg::ref_ptr mSourceGeometry; - osg::ref_ptr mSkeleton; + Skeleton* mSkeleton; osg::ref_ptr mInfluenceMap;