From 4e1f8165cd6eaf4a55c68668b90d0833993b1521 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Tue, 1 May 2018 05:02:12 +0000
Subject: MAINT-8598 Fixed Incorrect context menu for sounds in task inventory

---
 indra/newview/llpanelobjectinventory.cpp | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp
index c50f3477ad..6afd729a76 100644
--- a/indra/newview/llpanelobjectinventory.cpp
+++ b/indra/newview/llpanelobjectinventory.cpp
@@ -978,9 +978,13 @@ void LLTaskSoundBridge::performAction(LLInventoryModel* model, std::string actio
 void LLTaskSoundBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 {
 	LLInventoryItem* item = findItem();
-	if(!item) return;
 	std::vector<std::string> items;
 	std::vector<std::string> disabled_items;
+	if (!item)
+	{
+		hide_context_entries(menu, items, disabled_items);
+		return;
+	}
 
 	if(item->getPermissions().getOwner() != gAgent.getID()
 	   && item->getSaleInfo().isForSale())
@@ -1352,9 +1356,13 @@ void LLTaskMeshBridge::performAction(LLInventoryModel* model, std::string action
 void LLTaskMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags)
 {
 	LLInventoryItem* item = findItem();
-	if(!item) return;
 	std::vector<std::string> items;
 	std::vector<std::string> disabled_items;
+	if(!item)
+	{
+		hide_context_entries(menu, items, disabled_items);
+		return;
+	}
 
 	if(item->getPermissions().getOwner() != gAgent.getID()
 	   && item->getSaleInfo().isForSale())
-- 
cgit v1.2.3