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.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp
index 07338b7b6b..2f2bc3f91f 100644
--- a/indra/newview/llviewerinventory.cpp
+++ b/indra/newview/llviewerinventory.cpp
@@ -1928,11 +1928,13 @@ const LLUUID& LLViewerInventoryItem::getThumbnailUUID() const
}
if (mThumbnailUUID.isNull() && mType == LLAssetType::AT_LINK)
{
- return gInventory.getItem(getLinkedUUID())->getThumbnailUUID();
+ LLViewerInventoryItem *linked_item = gInventory.getItem(mAssetUUID);
+ return linked_item ? linked_item->getThumbnailUUID() : LLUUID::null;
}
if (mThumbnailUUID.isNull() && mType == LLAssetType::AT_LINK_FOLDER)
{
- return gInventory.getCategory(getLinkedUUID())->getThumbnailUUID();
+ LLViewerInventoryCategory *linked_cat = gInventory.getCategory(mAssetUUID);
+ return linked_cat ? linked_cat->getThumbnailUUID() : LLUUID::null;
}
return mThumbnailUUID;
}