diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2020-01-13 17:35:30 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2020-01-13 17:35:30 +0200 |
commit | c3d706be9e975a77976dc9d4656a1b50a95151a7 (patch) | |
tree | 2452f8ab597bd940cea7c75a31a96d1f2733af52 /indra/newview/llpanelobjectinventory.cpp | |
parent | 814a218785b2c5c0aa3b2c0bd6e6d5fee795d134 (diff) |
SL-12537 Fixed crash when the box with 'script' moves between two regions
Diffstat (limited to 'indra/newview/llpanelobjectinventory.cpp')
-rw-r--r-- | indra/newview/llpanelobjectinventory.cpp | 9 |
1 files changed, 5 insertions, 4 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. |