summaryrefslogtreecommitdiff
path: root/indra/llappearance/llavatarappearance.cpp
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2022-10-19 22:17:34 -0400
committerRye Mutt <rye@alchemyviewer.org>2022-10-19 22:17:34 -0400
commit5326e3a206d8fb2ed79c909bb37a34f848b77672 (patch)
tree989925f93626bbd7d620db318c685ff9ca8c6e4a /indra/llappearance/llavatarappearance.cpp
parentd0f0d77474ac3630a2d1fca2f819ef67bdfff0fb (diff)
Fix leak of mRoot during LLAvatarAppearance destruction
Diffstat (limited to 'indra/llappearance/llavatarappearance.cpp')
-rw-r--r--indra/llappearance/llavatarappearance.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llappearance/llavatarappearance.cpp b/indra/llappearance/llavatarappearance.cpp
index 2d6d2a10d2..232123a635 100644
--- a/indra/llappearance/llavatarappearance.cpp
+++ b/indra/llappearance/llavatarappearance.cpp
@@ -305,7 +305,12 @@ LLAvatarAppearance::~LLAvatarAppearance()
}
}
- if (mRoot) mRoot->removeAllChildren();
+ if (mRoot)
+ {
+ mRoot->removeAllChildren();
+ delete mRoot;
+ mRoot = nullptr;
+ }
mJointMap.clear();
clearSkeleton();