summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authormaxim_productengine <mnikolenko@productengine.com>2018-11-06 17:14:36 +0200
committermaxim_productengine <mnikolenko@productengine.com>2018-11-06 17:14:36 +0200
commit2f12e96e6120e64620a75fc9be8be440565f86d3 (patch)
tree5f37a8a4c1cce407931882acec7d62a15286ca4b /indra/newview
parent23356ac003a264957f058c43adbaa1833cd1d73b (diff)
SL-10013 Crash in LLFolderViewModelItemInventory::filterChildItem(..)
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfolderviewmodelinventory.cpp28
1 files changed, 15 insertions, 13 deletions
diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index b93dfaf061..d40a7234e2 100644
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -181,24 +181,26 @@ bool LLFolderViewModelItemInventory::filterChildItem( LLFolderViewModelItem* ite
S32 filter_generation = filter.getCurrentGeneration();
bool continue_filtering = true;
- if (item->getLastFilterGeneration() < filter_generation)
+ if (item)
{
- // Recursive application of the filter for child items (CHUI-849)
- continue_filtering = item->filter( filter );
- }
+ if (item->getLastFilterGeneration() < filter_generation)
+ {
+ // Recursive application of the filter for child items (CHUI-849)
+ continue_filtering = item->filter(filter);
+ }
- // Update latest generation to pass filter in parent and propagate up to root
- if (item->passedFilter())
- {
- LLFolderViewModelItemInventory* view_model = this;
-
- while(view_model && view_model->mMostFilteredDescendantGeneration < filter_generation)
+ // Update latest generation to pass filter in parent and propagate up to root
+ if (item->passedFilter())
{
- view_model->mMostFilteredDescendantGeneration = filter_generation;
- view_model = static_cast<LLFolderViewModelItemInventory*>(view_model->mParent);
+ LLFolderViewModelItemInventory* view_model = this;
+
+ while (view_model && view_model->mMostFilteredDescendantGeneration < filter_generation)
+ {
+ view_model->mMostFilteredDescendantGeneration = filter_generation;
+ view_model = static_cast<LLFolderViewModelItemInventory*>(view_model->mParent);
+ }
}
}
-
return continue_filtering;
}