From 5326e3a206d8fb2ed79c909bb37a34f848b77672 Mon Sep 17 00:00:00 2001 From: Rye Mutt Date: Wed, 19 Oct 2022 22:17:34 -0400 Subject: Fix leak of mRoot during LLAvatarAppearance destruction --- indra/llappearance/llavatarappearance.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/llappearance/llavatarappearance.cpp') 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(); -- cgit v1.2.3