summaryrefslogtreecommitdiff
path: root/indra/newview/llpreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpreview.cpp')
-rw-r--r--indra/newview/llpreview.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 99e0b82b8f..d0db77dcbe 100644
--- a/indra/newview/llpreview.cpp
+++ b/indra/newview/llpreview.cpp
@@ -36,7 +36,7 @@
#include "llpreview.h"
#include "lllineeditor.h"
-#include "llinventory.h"
+#include "llinventorydefines.h"
#include "llinventorymodel.h"
#include "llresmgr.h"
#include "lltextbox.h"
@@ -179,10 +179,9 @@ void LLPreview::onCommit()
// update the object itself.
if( item->getType() == LLAssetType::AT_OBJECT )
{
- LLVOAvatarSelf* avatarp = gAgent.getAvatarObject();
- if(avatarp)
+ if (isAgentAvatarValid())
{
- LLViewerObject* obj = avatarp->getWornAttachment( item->getUUID() );
+ LLViewerObject* obj = gAgentAvatarp->getWornAttachment( item->getUUID() );
if( obj )
{
LLSelectMgr::getInstance()->deselectAll();