From 629d21e4ecaf9cc947a33a0c6cfd413a8616debd Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Mon, 5 Nov 2018 17:52:53 +0200 Subject: SL-1386 Fix for onSelectionChange crash --- indra/newview/llinventorypanel.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 1481992f43..45dbb446eb 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1128,12 +1128,16 @@ void LLInventoryPanel::onSelectionChange(const std::deque& it mCompletionObserver->reset(); for (std::deque::const_iterator it = items.begin(); it != items.end(); ++it) { - LLUUID id = static_cast((*it)->getViewModelItem())->getUUID(); - LLViewerInventoryItem* inv_item = mInventory->getItem(id); - - if (inv_item && !inv_item->isFinished()) + LLFolderViewModelItemInventory* view_model = static_cast((*it)->getViewModelItem()); + if (view_model) { - mCompletionObserver->watchItem(id); + LLUUID id = view_model->getUUID(); + LLViewerInventoryItem* inv_item = mInventory->getItem(id); + + if (inv_item && !inv_item->isFinished()) + { + mCompletionObserver->watchItem(id); + } } } -- cgit v1.2.3 From ccd20624e37d74217b5d633fb74ebc81672c53f5 Mon Sep 17 00:00:00 2001 From: maxim_productengine Date: Fri, 9 Nov 2018 16:44:06 +0200 Subject: SL-10018 FIXED Viewer crashes when clicking on a link of a folder in Inventory --- indra/newview/llinventorypanel.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'indra/newview/llinventorypanel.cpp') diff --git a/indra/newview/llinventorypanel.cpp b/indra/newview/llinventorypanel.cpp index 45dbb446eb..3992b506e9 100644 --- a/indra/newview/llinventorypanel.cpp +++ b/indra/newview/llinventorypanel.cpp @@ -1163,6 +1163,11 @@ void LLInventoryPanel::onSelectionChange(const std::deque& it LLFolderViewModelItemInventory* fve_listener = static_cast(folder_item->getViewModelItem()); if (fve_listener && (fve_listener->getInventoryType() == LLInventoryType::IT_CATEGORY)) { + if (fve_listener->getInventoryObject() && fve_listener->getInventoryObject()->getIsLinkType()) + { + return; + } + if(prev_folder_item) { LLFolderBridge* prev_bridge = (LLFolderBridge*)prev_folder_item->getViewModelItem(); -- cgit v1.2.3