summaryrefslogtreecommitdiff
path: root/indra/newview/lltooldraganddrop.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2023-10-31 22:16:27 +0200
committerakleshchev <117672381+akleshchev@users.noreply.github.com>2023-10-31 23:18:11 +0200
commit40e568a3180f641fe0feb0e6ddd696c07ed662be (patch)
treee18ac9b8f7f97e4533556ef79528f36492bd44c1 /indra/newview/lltooldraganddrop.cpp
parentf72309a17eab1be1979c58a135e061ebffc37e21 (diff)
SL-20549 Blank no-copy materials are not moved into scripted objects
Diffstat (limited to 'indra/newview/lltooldraganddrop.cpp')
-rw-r--r--indra/newview/lltooldraganddrop.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp
index 97be78df77..e7f96239fd 100644
--- a/indra/newview/lltooldraganddrop.cpp
+++ b/indra/newview/lltooldraganddrop.cpp
@@ -961,7 +961,9 @@ BOOL LLToolDragAndDrop::handleDropMaterialProtections(LLViewerObject* hit_obj,
LLNotificationsUtil::add("ErrorMessage", args);
return FALSE;
}
- if (hit_obj->getInventoryItemByAsset(item->getAssetUUID()))
+ // Make sure to verify both id and type since 'null'
+ // is a shared default for some asset types.
+ if (hit_obj->getInventoryItemByAsset(item->getAssetUUID(), item->getType()))
{
// if the asset is already in the object's inventory
// then it can always be added to a side.