diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index c123501059bbee3252f47e476fa06c247c2ed22d..dd5f607b042dc39b8b85b61a9352b83302b6a4c8 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()))