summaryrefslogtreecommitdiff
path: root/indra/newview/llinventoryfunctions.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llinventoryfunctions.cpp')
-rw-r--r--indra/newview/llinventoryfunctions.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/indra/newview/llinventoryfunctions.cpp b/indra/newview/llinventoryfunctions.cpp
index d3e2a2f555..f1b7806635 100644
--- a/indra/newview/llinventoryfunctions.cpp
+++ b/indra/newview/llinventoryfunctions.cpp
@@ -352,8 +352,7 @@ BOOL get_is_item_worn(const LLUUID& id)
{
case LLAssetType::AT_OBJECT:
{
- const LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
- if(avatarp && avatarp->isWearingAttachment(item->getLinkedUUID()))
+ if (isAgentAvatarValid() && gAgentAvatar->isWearingAttachment(item->getLinkedUUID()))
return TRUE;
break;
}