summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indra/newview/llavataractions.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/indra/newview/llavataractions.cpp b/indra/newview/llavataractions.cpp
index fb1426a235..c95e98982d 100644
--- a/indra/newview/llavataractions.cpp
+++ b/indra/newview/llavataractions.cpp
@@ -853,6 +853,13 @@ namespace action_give_inventory
break;
}
LLViewerInventoryItem* inv_item = gInventory.getItem(*it);
+ if (!inv_item)
+ {
+ shared = false;
+ LL_WARNS() << "Failed to share an item " << *it
+ << ". Item was not found in inventory." << LL_ENDL;
+ continue;
+ }
if (!inv_item->getPermissions().allowCopyBy(gAgentID))
{
if (!noncopy_item_names.empty())