diff options
author | Maxim Nikolenko <maximnproductengine@lindenlab.com> | 2025-02-04 19:19:50 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-04 19:19:50 +0200 |
commit | 265ebfb82f09f1c2c24578d4817ba389059e6da0 (patch) | |
tree | e645d64fbbfd71a92d141bf48be68c6ee06f3c5a /indra/newview/llconversationmodel.cpp | |
parent | b3fb4183e23dc39dd92b2e6e54d7f4b4cce40145 (diff) |
#3346 crash at LLConversationItemSession::clearAndDeparentModels
Diffstat (limited to 'indra/newview/llconversationmodel.cpp')
-rw-r--r-- | indra/newview/llconversationmodel.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 4cd85ac756..5004055666 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -357,8 +357,9 @@ void LLConversationItemSession::clearParticipants() void LLConversationItemSession::clearAndDeparentModels() { - for (LLFolderViewModelItem* child : mChildren) + for (child_list_t::iterator it = mChildren.begin(); it != mChildren.end();) { + LLFolderViewModelItem* child = *it; if (child->getNumRefs() == 0) { // LLConversationItemParticipant can be created but not assigned to any view, @@ -370,8 +371,8 @@ void LLConversationItemSession::clearAndDeparentModels() // Model is still assigned to some view/widget child->setParent(NULL); } + it = mChildren.erase(it); } - mChildren.clear(); } LLConversationItemParticipant* LLConversationItemSession::findParticipant(const LLUUID& participant_id) |