diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-11-05 17:52:53 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2018-11-05 17:52:53 +0200 |
commit | 629d21e4ecaf9cc947a33a0c6cfd413a8616debd (patch) | |
tree | ae2cc67d4d800190a67c22a3a1da10af0cfb3b5b /indra/newview/llinventorypanel.cpp | |
parent | f8106e9f3fbf2f075bc01c93ec9681b7848bc742 (diff) |
SL-1386 Fix for onSelectionChange crash
Diffstat (limited to 'indra/newview/llinventorypanel.cpp')
-rw-r--r-- | indra/newview/llinventorypanel.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
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<LLFolderViewItem*>& it mCompletionObserver->reset(); for (std::deque<LLFolderViewItem*>::const_iterator it = items.begin(); it != items.end(); ++it) { - LLUUID id = static_cast<LLFolderViewModelItemInventory*>((*it)->getViewModelItem())->getUUID(); - LLViewerInventoryItem* inv_item = mInventory->getItem(id); - - if (inv_item && !inv_item->isFinished()) + LLFolderViewModelItemInventory* view_model = static_cast<LLFolderViewModelItemInventory*>((*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); + } } } |