From ea10cffd592578a1dfdf68a154767a2e02cb9252 Mon Sep 17 00:00:00 2001
From: Rye Mutt <rye@alchemyviewer.org>
Date: Wed, 12 Feb 2020 02:56:27 -0500
Subject: [PATCH] More inventory link stuff

---
 indra/newview/llinventorybridge.cpp | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp
index 05f2a64cae..1683999568 100644
--- a/indra/newview/llinventorybridge.cpp
+++ b/indra/newview/llinventorybridge.cpp
@@ -4155,6 +4155,12 @@ void LLFolderBridge::buildContextMenuOptions(U32 flags, menuentry_vec_t&   items
 				{
 					disabled_items.push_back(std::string("Delete"));
 				}
+
+				items.push_back(std::string("Paste As Link"));
+				if (!isClipboardPasteableAsLink() || (flags & FIRST_SELECTED_ITEM) == 0)
+				{
+					disabled_items.push_back(std::string("Paste As Link"));
+				}
 			}
 		}
 
@@ -4762,6 +4768,9 @@ bool move_task_inventory_callback(const LLSD& notification, const LLSD& response
 // Returns true if the item can be moved to Current Outfit or any outfit folder.
 static BOOL can_move_to_outfit(LLInventoryItem* inv_item, BOOL move_is_into_current_outfit)
 {
+	if( !inv_item )
+		return FALSE;
+
 	LLInventoryType::EType inv_type = inv_item->getInventoryType();
 	if ((inv_type != LLInventoryType::IT_WEARABLE) &&
 		(inv_type != LLInventoryType::IT_GESTURE) &&
-- 
GitLab