summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 78e8f084c7..9a090be76a 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1185,6 +1185,17 @@ U32 LLViewerInventoryItem::getCRC32() const
return LLInventoryItem::getCRC32();
}
+// This returns true if the item that this item points to
+// doesn't exist in memory (i.e. LLInventoryModel). The baseitem
+// might still be in the database but just not loaded yet.
+bool LLViewerInventoryItem::getIsBrokenLink() const
+{
+ // If the item's type resolves to be a link, that means either:
+ // A. It wasn't able to perform indirection, i.e. the baseobj doesn't exist in memory.
+ // B. It's pointing to another link, which is illegal.
+ return LLAssetType::lookupIsLinkType(getType());
+}
+
const LLViewerInventoryItem *LLViewerInventoryItem::getLinkedItem() const
{
if (mType == LLAssetType::AT_LINK)