summaryrefslogtreecommitdiff
path: root/indra/newview/llinventorymodel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventorymodel.cpp')
-rw-r--r--indra/newview/llinventorymodel.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/indra/newview/llinventorymodel.cpp b/indra/newview/llinventorymodel.cpp
index 1f9840923c..7c8fb4f9b9 100644
--- a/indra/newview/llinventorymodel.cpp
+++ b/indra/newview/llinventorymodel.cpp
@@ -3774,7 +3774,6 @@ bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* ite
return false;
bool allowed = false;
- LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
switch(item->getType())
{
@@ -3783,7 +3782,7 @@ bool LLInventoryCollectFunctor::itemTransferCommonlyAllowed(LLInventoryItem* ite
break;
case LLAssetType::AT_OBJECT:
- if(avatarp && !avatarp->isWearingAttachment(item->getUUID()))
+ if (isAgentAvatarValid() && !gAgentAvatar->isWearingAttachment(item->getUUID()))
{
allowed = true;
}