From ab66df94cb7c4cc9a4530ea547aaf81dddec34de Mon Sep 17 00:00:00 2001
From: Cosmic Linden <cosmic@lindenlab.com>
Date: Wed, 6 Sep 2023 11:02:31 -0700
Subject: SL-20167: Also check permission on paste to be certain

---
 indra/newview/llpanelface.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'indra/newview')

diff --git a/indra/newview/llpanelface.cpp b/indra/newview/llpanelface.cpp
index d86956e370..df464bc7e5 100644
--- a/indra/newview/llpanelface.cpp
+++ b/indra/newview/llpanelface.cpp
@@ -4344,7 +4344,8 @@ void LLPanelFace::onPasteTexture()
         || objectp->getPCode() != LL_PCODE_VOLUME
         || !objectp->permModify()
         || objectp->isPermanentEnforced()
-        || selected_count > 1)
+        || selected_count > 1
+        || !LLMaterialEditor::canClipboardObjectsMaterial())
     {
         // not supposed to happen
         LL_WARNS() << "Failed to paste texture due to missing or wrong selection" << LL_ENDL;
-- 
cgit v1.2.3