From 991103296e02d365ca57d3b71f71b4a05d17505a Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Mon, 6 Feb 2023 23:09:00 -0500
Subject: [PATCH] Fix findChild stall on complexity update

---
 indra/newview/llsidepanelappearance.cpp | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/indra/newview/llsidepanelappearance.cpp b/indra/newview/llsidepanelappearance.cpp
index 7827d86d221..3bcd941460a 100644
--- a/indra/newview/llsidepanelappearance.cpp
+++ b/indra/newview/llsidepanelappearance.cpp
@@ -571,10 +571,13 @@ bool LLSidepanelAppearance::isWearableEditPanelVisible() const
 void LLSidepanelAppearance::updateAvatarComplexity(U32 complexity, const std::map<LLUUID, U32>& item_complexity, const std::map<LLUUID, U32>& temp_item_complexity, U32 body_parts_complexity)
 {
 	LLSidepanelAppearance* instance = LLFloaterSidePanelContainer::getPanel<LLSidepanelAppearance>("appearance");
-	if (instance->mLastAvatarComplexity != complexity)
+	if(instance)
 	{
-		instance->mPanelOutfitsInventory->updateAvatarComplexity(complexity, item_complexity, temp_item_complexity, body_parts_complexity);
-		instance->mOutfitEdit->updateAvatarComplexity(complexity);
+		if (instance->mLastAvatarComplexity != complexity)
+		{
+			instance->mPanelOutfitsInventory->updateAvatarComplexity(complexity, item_complexity, temp_item_complexity, body_parts_complexity);
+			instance->mOutfitEdit->updateAvatarComplexity(complexity);
+		}
+		instance->mLastAvatarComplexity = complexity;
 	}
-	instance->mLastAvatarComplexity = complexity;
 }
\ No newline at end of file
-- 
GitLab