diff options
author | AlexanderP ProductEngine <apaschenko@productengine.com> | 2012-12-19 17:26:55 +0200 |
---|---|---|
committer | AlexanderP ProductEngine <apaschenko@productengine.com> | 2012-12-19 17:26:55 +0200 |
commit | d2102c9b9f7ad31d3b5061a19f7b955af2f34b9f (patch) | |
tree | 901abd2ba5a271d1765cbe25fb3e205d5b6fa1a3 | |
parent | 22c2fff4ba4198b8dca8367ae3f03d189e815770 (diff) |
CHUI-601 : Fixed : Crash when dismissing a conversation while a participant is selected
DeletePointer() for the items was replaced by Function LLFolderViewItem::destroyView():
Function LLFolderViewItem::destroyView(), before removing the item, immediately removes it from the Selection List of the Root Folder. As a result, at the time of the call of sanitizeSelection(), will not need to try to handle the elements that have already been deleted.
-rwxr-xr-x | indra/llui/llfolderviewitem.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/indra/llui/llfolderviewitem.cpp b/indra/llui/llfolderviewitem.cpp index 0a06ce66aa..dc7e4777a7 100755 --- a/indra/llui/llfolderviewitem.cpp +++ b/indra/llui/llfolderviewitem.cpp @@ -1481,17 +1481,20 @@ void LLFolderViewFolder::extendSelectionTo(LLFolderViewItem* new_selection) void LLFolderViewFolder::destroyView() { - std::for_each(mItems.begin(), mItems.end(), DeletePointer()); - mItems.clear(); + while (!mItems.empty()) + { + LLFolderViewItem *itemp = mItems.back(); + itemp->destroyView(); // LLFolderViewItem::destroyView() removes entry from mItems + } while (!mFolders.empty()) { LLFolderViewFolder *folderp = mFolders.back(); - folderp->destroyView(); // removes entry from mFolders + folderp->destroyView(); // LLFolderVievFolder::destroyView() removes entry from mFolders } LLFolderViewItem::destroyView(); - } +} // extractItem() removes the specified item from the folder, but // doesn't delete it. |