summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerobject.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llviewerobject.cpp')
-rwxr-xr-xindra/newview/llviewerobject.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp
index c789719291..1900112822 100755
--- a/indra/newview/llviewerobject.cpp
+++ b/indra/newview/llviewerobject.cpp
@@ -2563,8 +2563,8 @@ void LLViewerObject::dirtyInventory()
mInventory->clear(); // will deref and delete entries
delete mInventory;
mInventory = NULL;
- mInventoryDirty = TRUE;
}
+ mInventoryDirty = TRUE;
}
void LLViewerObject::registerInventoryListener(LLVOInventoryListener* listener, void* user_data)
@@ -2601,12 +2601,15 @@ void LLViewerObject::clearInventoryListeners()
void LLViewerObject::requestInventory()
{
- mInventoryDirty = FALSE;
+ if(mInventoryDirty && mInventory && !mInventoryCallbacks.empty())
+ {
+ mInventory->clear(); // will deref and delete entries
+ delete mInventory;
+ mInventory = NULL;
+ mInventoryDirty = FALSE; //since we are going to request it now
+ }
if(mInventory)
{
- //mInventory->clear() // will deref and delete it
- //delete mInventory;
- //mInventory = NULL;
doInventoryCallback();
}
// throw away duplicate requests