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

SL-14270 Crash accessing deleted 'parent' via callback from child

parent 842d84b8
No related branches found
No related tags found
No related merge requests found
...@@ -29,6 +29,11 @@ ...@@ -29,6 +29,11 @@
#include "llfolderviewmodel.h" #include "llfolderviewmodel.h"
#include "lltrans.h" #include "lltrans.h"
LLFolderViewModelItemCommon::~LLFolderViewModelItemCommon()
{
clearChildren();
}
bool LLFolderViewModelCommon::needsSort(LLFolderViewModelItem* item) bool LLFolderViewModelCommon::needsSort(LLFolderViewModelItem* item)
{ {
return item->getSortVersion() < mTargetSortVersion; return item->getSortVersion() < mTargetSortVersion;
......
...@@ -248,6 +248,8 @@ class LLFolderViewModelItemCommon : public LLFolderViewModelItem ...@@ -248,6 +248,8 @@ class LLFolderViewModelItemCommon : public LLFolderViewModelItem
mChildren.clear(); mChildren.clear();
} }
virtual ~LLFolderViewModelItemCommon();
void requestSort() { mSortVersion = -1; } void requestSort() { mSortVersion = -1; }
S32 getSortVersion() { return mSortVersion; } S32 getSortVersion() { return mSortVersion; }
void setSortVersion(S32 version) { mSortVersion = version;} void setSortVersion(S32 version) { mSortVersion = version;}
...@@ -399,6 +401,8 @@ class LLFolderViewModelCommon : public LLFolderViewModelInterface ...@@ -399,6 +401,8 @@ class LLFolderViewModelCommon : public LLFolderViewModelInterface
mFolderView(NULL) mFolderView(NULL)
{} {}
virtual ~LLFolderViewModelCommon() {}
virtual void requestSortAll() virtual void requestSortAll()
{ {
// sort everything // sort everything
......
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