diff options
Diffstat (limited to 'indra/newview/llfolderviewmodelinventory.cpp')
-rw-r--r-- | indra/newview/llfolderviewmodelinventory.cpp | 28 |
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; } |