From 2b2101958d8927b4d0408f9a64ee418e4d093c99 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Wed, 7 Aug 2013 03:30:19 -0700 Subject: [PATCH] Destroy the scene node we create --- apps/openmw/mwrender/animation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/openmw/mwrender/animation.cpp b/apps/openmw/mwrender/animation.cpp index 2baadbed0d..055d14ecbf 100644 --- a/apps/openmw/mwrender/animation.cpp +++ b/apps/openmw/mwrender/animation.cpp @@ -74,8 +74,7 @@ Animation::Animation(const MWWorld::Ptr &ptr, Ogre::SceneNode *node) { for(size_t i = 0;i < sNumGroups;i++) mAnimationValuePtr[i].bind(OGRE_NEW AnimationValue(this)); - mInsert = node ? node->createChildSceneNode() : - mPtr.getRefData().getBaseNode()->createChildSceneNode(); + mInsert = node->createChildSceneNode(); } Animation::~Animation() @@ -86,6 +85,8 @@ Animation::~Animation() Ogre::SceneManager *sceneMgr = mInsert->getCreator(); destroyObjectList(sceneMgr, mObjectRoot); + + sceneMgr->destroySceneNode(mInsert); } }