diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index 74636580034467623f56f5ac486c43e7e3f52478..2d11337955c0f86bf87cddcb9bb6a1138a32858a 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -433,13 +433,12 @@ void show_item_original(const LLUUID& item_uuid)
 				LLPanelMainInventory* main_inventory = floater_inventory->getMainInventoryPanel();
 
 				main_inventory->onFilterEdit("");
-			}
 
-			if(floater_inventory->getVisible())
-			{
-				floater_inventory_visible = true;
+				if(floater_inventory->getVisible())
+				{
+					floater_inventory_visible = true;
+				}
 			}
-
 		}
 		if(sidepanel_inventory && !floater_inventory_visible)
 		{