summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorRunitaiLinden <davep@lindenlab.com>2023-08-22 13:18:12 -0500
committerRunitaiLinden <davep@lindenlab.com>2023-08-22 13:18:12 -0500
commita3a811606088f1b40d9e098ddff8b38a2420b8e9 (patch)
tree5203dfa631fa87a4563c002ab117f1ae5c5dfbaf /indra/newview/llviewerobject.cpp
parent894c9e0417e7b29aaf31c673ca040dff93eb36ef (diff)
parentef33902f220df35727ba54ee8bc3ed02bc53d6be (diff)
Merge branch 'DRTVWR-559' of github.com:secondlife/viewer into DRTVWR-559
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r--indra/newview/llviewerobject.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index d21d6f7027..69e62ace97 100644
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -3610,6 +3610,17 @@ LLInventoryObject* LLViewerObject::getInventoryObject(const LLUUID& item_id)
return rv;
}
+LLInventoryItem* LLViewerObject::getInventoryItem(const LLUUID& item_id)
+{
+ LLInventoryObject* iobj = getInventoryObject(item_id);
+ if (!iobj || iobj->getType() == LLAssetType::AT_CATEGORY)
+ {
+ return NULL;
+ }
+ LLInventoryItem* item = dynamic_cast<LLInventoryItem*>(iobj);
+ return item;
+}
+
void LLViewerObject::getInventoryContents(LLInventoryObject::object_list_t& objects)
{
if(mInventory)