summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
authorCosmic Linden <cosmic@lindenlab.com>2023-08-07 14:26:33 -0700
committerCosmic Linden <cosmic@lindenlab.com>2023-08-11 16:31:01 -0700
commit76c8cca9363c0ef55bf66a2bbff4a86a02f37acf (patch)
tree9cfc97ccb55239bc8963ac8a4442d14e7df271ab /indra/newview/llviewerobject.cpp
parent6c8ced0edd9e2b86914e3e316ba65ae9492d3e6f (diff)
SL-20024: Fix author attributions not transferring for saved object materials, fix item not renamed
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)