diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2024-08-28 20:47:43 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2024-08-28 20:47:43 -0400 |
commit | cde1174345224d33d6b45b1e3243fa39043223e5 (patch) | |
tree | 6c8db6e0499622d8c7206a11c997eb173ebd478f /indra/newview/llconversationmodel.cpp | |
parent | 6f454ad8366ed33bbe199c3fc3ed69e6d3448cec (diff) | |
parent | 35efadf78315f9b351415930dca4fae251ef4dd0 (diff) |
Merge branch 'main' into release/luau-scripting.
Diffstat (limited to 'indra/newview/llconversationmodel.cpp')
-rw-r--r-- | indra/newview/llconversationmodel.cpp | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp index 4335168417..4cd85ac756 100644 --- a/indra/newview/llconversationmodel.cpp +++ b/indra/newview/llconversationmodel.cpp @@ -357,22 +357,20 @@ void LLConversationItemSession::clearParticipants() void LLConversationItemSession::clearAndDeparentModels() { - std::for_each(mChildren.begin(), mChildren.end(), - [](LLFolderViewModelItem* c) + for (LLFolderViewModelItem* child : mChildren) + { + if (child->getNumRefs() == 0) { - if (c->getNumRefs() == 0) - { - // LLConversationItemParticipant can be created but not assigned to any view, - // it was waiting for an "add_participant" event to be processed - delete c; - } - else - { - // Model is still assigned to some view/widget - c->setParent(NULL); - } + // LLConversationItemParticipant can be created but not assigned to any view, + // it was waiting for an "add_participant" event to be processed + delete child; } - ); + else + { + // Model is still assigned to some view/widget + child->setParent(NULL); + } + } mChildren.clear(); } |