diff --git a/indra/newview/llappearancemgr.cpp b/indra/newview/llappearancemgr.cpp
index 043f6f37bfaa934f0031b440c8de2c68fc603930..71cd6faecca2138a878e180a0aaa29396910dc3e 100644
--- a/indra/newview/llappearancemgr.cpp
+++ b/indra/newview/llappearancemgr.cpp
@@ -536,6 +536,7 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append)
 	linkAll(cof, obj_items, link_waiter);
 	linkAll(cof, gest_items, link_waiter);
 
+	LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
 	// Add link to outfit if category is an outfit. 
 	LLViewerInventoryCategory* catp = gInventory.getCategory(category);
 	if (!append && catp && catp->getPreferredType() == LLFolderType::FT_OUTFIT)
@@ -544,13 +545,18 @@ void LLAppearanceManager::updateCOF(const LLUUID& category, bool append)
 							LLAssetType::AT_LINK_FOLDER, link_waiter);
 
 		// Update the current outfit name of the appearance sidepanel.
-		LLSidepanelAppearance* panel_appearance = dynamic_cast<LLSidepanelAppearance *>(LLSideTray::getInstance()->getPanel("sidepanel_appearance"));
 		if (panel_appearance)
 		{
 			panel_appearance->refreshCurrentOutfitName(catp->getName());
 		}
 	}
-							  
+	else
+	{
+		if (panel_appearance)
+		{
+			panel_appearance->refreshCurrentOutfitName("");
+		}
+	}
 }
 
 void LLAppearanceManager::updateAgentWearables(LLWearableHoldingPattern* holder, bool append)