From 9be8103142dc16b58dcf930d5d1f70f49272837f Mon Sep 17 00:00:00 2001 From: Cosmic Linden Date: Wed, 19 Jul 2023 16:56:36 -0700 Subject: SL-20024: Early return --- indra/newview/lltooldraganddrop.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index c123501059..dd5f607b04 100644 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -930,6 +930,8 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, LLToolDragAndDrop::ESource source, const LLUUID& src_id) { + if (!item) return FALSE; + // Always succeed if.... // material is from the library // or already in the contents of the object @@ -967,8 +969,6 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj, // and ensures that the asset item is only added once. return TRUE; } - - if (!item) return FALSE; LLPointer new_item = new LLViewerInventoryItem(item); if (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID())) -- cgit v1.2.3