Skip to content
Snippets Groups Projects
Commit 561da5bd authored by Andrey Kleshchev's avatar Andrey Kleshchev
Browse files

SL-14270 Crash fix

parent dc136e8d
No related branches found
No related tags found
No related merge requests found
...@@ -50,7 +50,14 @@ LLFolderViewModelItemCommon::LLFolderViewModelItemCommon(LLFolderViewModelInterf ...@@ -50,7 +50,14 @@ LLFolderViewModelItemCommon::LLFolderViewModelItemCommon(LLFolderViewModelInterf
LLFolderViewModelItemCommon::~LLFolderViewModelItemCommon() LLFolderViewModelItemCommon::~LLFolderViewModelItemCommon()
{ {
clearChildren(); // Children don't belong to model, but to LLFolderViewItem, just mark them as having no parent
std::for_each(mChildren.begin(), mChildren.end(), [](LLFolderViewModelItem* c) {c->setParent(NULL); });
// Don't leave dead pointer in parent
if (mParent)
{
mParent->removeChild(this);
}
} }
void LLFolderViewModelItemCommon::dirtyFilter() void LLFolderViewModelItemCommon::dirtyFilter()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment