diff options
author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-08-29 03:40:10 -0700 |
---|---|---|
committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2023-08-29 03:40:10 -0700 |
commit | c5bfe869154cd4708c9bca63f08cb4c958198638 (patch) | |
tree | 6f79db9976863b2c1ea0f20bbb4049ee0cc98c1c /indra/newview/llviewerobject.cpp | |
parent | fbecd348f897ee91a5639e7e9fe4f0578d72b8e2 (diff) | |
parent | 89f2165b4170d9fddc10a55292c28750093a22a0 (diff) |
Merge branch 'DRTVWR-559' into DRTVWR-583
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 68162f83c0..59a61f0c63 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) |