diff --git a/indra/newview/llviewerwearable.cpp b/indra/newview/llviewerwearable.cpp
index ac291bf93cd545ef82ad96b7f8b77e18888b14a9..ec4de8cd5a00b4d98ea58e622e4102fd0eb6caf8 100644
--- a/indra/newview/llviewerwearable.cpp
+++ b/indra/newview/llviewerwearable.cpp
@@ -462,7 +462,7 @@ void LLViewerWearable::revertValues()
 {
 	LLWearable::revertValues();
 
-	LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::findPanel("appearance"));
+	LLSidepanelAppearance *panel = LLFloaterSidePanelContainer::findPanel<LLSidepanelAppearance>("appearance");
 	if( panel )
 	{
 		panel->updateScrollingPanelList();
@@ -478,7 +478,7 @@ void LLViewerWearable::saveValues()
 {
 	LLWearable::saveValues();
 
-	LLSidepanelAppearance *panel = dynamic_cast<LLSidepanelAppearance*>(LLFloaterSidePanelContainer::findPanel("appearance"));
+	LLSidepanelAppearance *panel = LLFloaterSidePanelContainer::findPanel<LLSidepanelAppearance>("appearance");
 	if( panel )
 	{
 		panel->updateScrollingPanelList();