diff options
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llpanelobjectinventory.cpp | 9 | ||||
-rw-r--r-- | indra/newview/llselectmgr.cpp | 2 | ||||
-rw-r--r-- | indra/newview/llviewerobject.cpp | 1 |
3 files changed, 7 insertions, 5 deletions
diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index 6702dae4d6..7756b92a3a 100644 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -1561,12 +1561,13 @@ void LLPanelObjectInventory::refresh() //LL_INFOS() << "LLPanelObjectInventory::refresh()" << LL_ENDL; BOOL has_inventory = FALSE; const BOOL non_root_ok = TRUE; - LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(NULL, non_root_ok); - if(node) + LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); + LLSelectNode* node = selection->getFirstRootNode(NULL, non_root_ok); + if(node && node->mValid) { LLViewerObject* object = node->getObject(); - if(object && ((LLSelectMgr::getInstance()->getSelection()->getRootObjectCount() == 1) - || (LLSelectMgr::getInstance()->getSelection()->getObjectCount() == 1))) + if(object && ((selection->getRootObjectCount() == 1) + || (selection->getObjectCount() == 1))) { // determine if we need to make a request. Start with a // default based on if we have inventory at all. diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index f849fecaf6..aee6bcb05e 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5426,7 +5426,7 @@ void LLSelectMgr::processObjectProperties(LLMessageSystem* msg, void** user_data } else { - if (node->mInventorySerial != inv_serial) + if (node->mInventorySerial != inv_serial && node->getObject()) { node->getObject()->dirtyInventory(); } diff --git a/indra/newview/llviewerobject.cpp b/indra/newview/llviewerobject.cpp index 17e61d3a0d..efd8a23a5f 100644 --- a/indra/newview/llviewerobject.cpp +++ b/indra/newview/llviewerobject.cpp @@ -2982,6 +2982,7 @@ void LLViewerObject::fetchInventoryFromServer() if (!isInventoryPending()) { delete mInventory; + mInventory = NULL; // Results in processTaskInv LLMessageSystem* msg = gMessageSystem; |