summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2020-01-13 17:35:30 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2020-01-13 17:35:30 +0200
commitc3d706be9e975a77976dc9d4656a1b50a95151a7 (patch)
tree2452f8ab597bd940cea7c75a31a96d1f2733af52 /indra
parent814a218785b2c5c0aa3b2c0bd6e6d5fee795d134 (diff)
SL-12537 Fixed crash when the box with 'script' moves between two regions
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llpanelobjectinventory.cpp9
-rw-r--r--indra/newview/llselectmgr.cpp2
-rw-r--r--indra/newview/llviewerobject.cpp1
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;