diff options
author | Roxanne Skelly <roxie@lindenlab.com> | 2024-06-26 15:46:07 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-26 15:46:07 -0700 |
commit | 9bc3dfbdeaba904999880f6b59306128c98469e8 (patch) | |
tree | 025ce6c54606f460ccc48bc90b2678b626cee9b5 /indra/newview/llconversationmodel.cpp | |
parent | 39473866fc8119a8ec10935f21b6d8d76432ecd1 (diff) | |
parent | 33418a77b716e122da9778869cdbabe97c83ff37 (diff) |
Merge pull request #1850 from secondlife/roxie/webrtc-voice-crash-fixes
Various crash fixes. ALso fixes an issue with adhoc/group calls on vivox regions.
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(); } |