diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-11-05 21:40:54 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-11-05 22:02:21 +0200 |
commit | 281c3d8beec393de9afced57c6756d0d367a1c77 (patch) | |
tree | c7a5b20163306f87aec3c4ef8e51611cc0b12870 | |
parent | 842d84b8ecdcf11baa603a48c957e68459a69d15 (diff) |
SL-14270 Crash accessing deleted 'parent' via callback from child
-rw-r--r-- | indra/llui/llfolderviewmodel.cpp | 5 | ||||
-rw-r--r-- | indra/llui/llfolderviewmodel.h | 4 |
2 files changed, 9 insertions, 0 deletions
diff --git a/indra/llui/llfolderviewmodel.cpp b/indra/llui/llfolderviewmodel.cpp index 3b45fb53a2..58a1ef646a 100644 --- a/indra/llui/llfolderviewmodel.cpp +++ b/indra/llui/llfolderviewmodel.cpp @@ -29,6 +29,11 @@ #include "llfolderviewmodel.h" #include "lltrans.h" +LLFolderViewModelItemCommon::~LLFolderViewModelItemCommon() +{ + clearChildren(); +} + bool LLFolderViewModelCommon::needsSort(LLFolderViewModelItem* item) { return item->getSortVersion() < mTargetSortVersion; diff --git a/indra/llui/llfolderviewmodel.h b/indra/llui/llfolderviewmodel.h index f71a88c56e..903049b9af 100644 --- a/indra/llui/llfolderviewmodel.h +++ b/indra/llui/llfolderviewmodel.h @@ -248,6 +248,8 @@ public: mChildren.clear(); } + virtual ~LLFolderViewModelItemCommon(); + void requestSort() { mSortVersion = -1; } S32 getSortVersion() { return mSortVersion; } void setSortVersion(S32 version) { mSortVersion = version;} @@ -399,6 +401,8 @@ public: mFolderView(NULL) {} + virtual ~LLFolderViewModelCommon() {} + virtual void requestSortAll() { // sort everything |