diff options
| author | Erik Kundiman <erik@megapahit.org> | 2024-06-27 20:52:28 +0800 |
|---|---|---|
| committer | Erik Kundiman <erik@megapahit.org> | 2024-06-27 20:52:28 +0800 |
| commit | 191170d4328c9d2356d99428276ba2f77977d2af (patch) | |
| tree | deebd5b29213d2a60104f0d09dba6e82c5afbeb5 /indra/newview/llconversationmodel.cpp | |
| parent | 9890ebc0978e0ec3567fb78dba4bd2d4a18855f3 (diff) | |
| parent | 9bc3dfbdeaba904999880f6b59306128c98469e8 (diff) | |
Merge remote-tracking branch 'secondlife/release/webrtc-voice' into webrtc-voice
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(); } |
