diff options
author | cosmic-linden <111533034+cosmic-linden@users.noreply.github.com> | 2023-08-14 09:29:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-14 09:29:58 -0700 |
commit | 50e2973cd2360dedd6baf1c0772d9d009e2628d4 (patch) | |
tree | 71a86030d3d52045642ea1a21168a2effc98e4f6 /indra/newview/llviewerobject.cpp | |
parent | d8e4572b901b429439f991703f2bc12f81e03901 (diff) | |
parent | 076a02e2d8ddb10856602c3f5f3115ace41327b5 (diff) |
Merge pull request #323 from secondlife/SL-20024
SL-20024: Improve material permissions handling
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rw-r--r-- | indra/newview/llviewerobject.cpp | 11 |
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) |