summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2023-07-19 16:56:36 -0700
committerCosmic Linden <cosmic@lindenlab.com>2023-08-11 12:52:06 -0700
commit9be8103142dc16b58dcf930d5d1f70f49272837f (patch)
tree65f260256644fb1daf7b9fa2d5488d8c26fbdc34 /indra
parenta4012ea073283b1e360333dfd9a13ede009f24d9 (diff)
SL-20024: Early return
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/lltooldraganddrop.cpp4
1 files 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<LLViewerInventoryItem> new_item = new LLViewerInventoryItem(item);
if (!item->getPermissions().allowOperationBy(PERM_COPY, gAgent.getID()))