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.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/indra/newview/llpreview.cpp b/indra/newview/llpreview.cpp
index 0b0c03e9e9..dd31a62642 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"
@@ -138,7 +138,7 @@ void LLPreview::onCommit()
const LLViewerInventoryItem *item = dynamic_cast<const LLViewerInventoryItem*>(getItem());
if(item)
{
- if (!item->isComplete())
+ if (!item->isFinished())
{
// We are attempting to save an item that was never loaded
llwarns << "LLPreview::onCommit() called with mIsComplete == FALSE"
@@ -179,10 +179,9 @@ void LLPreview::onCommit()
// update the object itself.
if( item->getType() == LLAssetType::AT_OBJECT )
{
- LLVOAvatarSelf* avatar = gAgent.getAvatarObject();
- if( avatar )
+ if (isAgentAvatarValid())
{
- LLViewerObject* obj = avatar->getWornAttachment( item->getUUID() );
+ LLViewerObject* obj = gAgentAvatarp->getWornAttachment( item->getUUID() );
if( obj )
{
LLSelectMgr::getInstance()->deselectAll();