From 62c82eef49006f6f94ca2f9ca10b5abc4612a61f Mon Sep 17 00:00:00 2001
From: Vadim Savchuk <vsavchuk@productengine.com>
Date: Thu, 10 Jun 2010 15:39:13 +0300
Subject: EXT-7620 FIXED Disable context-dependant outfit gear menu items if no
 (or invalid) outfit selected.

The "Create new clothes / body parts" menu items are always enabled because they have no on_enable callback set.

Reviewed by Mike Antipov at https://codereview.productengine.com/secondlife/r/548/

--HG--
branch : product-engine
---
 indra/newview/llpaneloutfitsinventory.cpp | 5 +++++
 1 file changed, 5 insertions(+)

(limited to 'indra/newview')

diff --git a/indra/newview/llpaneloutfitsinventory.cpp b/indra/newview/llpaneloutfitsinventory.cpp
index 0e1e94129b..1286642897 100644
--- a/indra/newview/llpaneloutfitsinventory.cpp
+++ b/indra/newview/llpaneloutfitsinventory.cpp
@@ -169,6 +169,11 @@ private:
 	bool onEnable(LLSD::String param)
 	{
 		const LLUUID& selected_outfit_id = getSelectedOutfitID();
+		if (selected_outfit_id.isNull()) // no selection or invalid outfit selected
+		{
+			return false;
+		}
+
 		bool is_worn = LLAppearanceMgr::instance().getBaseOutfitUUID() == selected_outfit_id;
 
 		if ("wear" == param)
-- 
cgit v1.2.3