summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationmodel.cpp
diff options
context:
space:
mode:
authorVir Linden <60274682+vir-linden@users.noreply.github.com>2024-04-24 16:02:42 -0400
committerGitHub <noreply@github.com>2024-04-24 16:02:42 -0400
commita3602d660c89a10126946d9c789e454fbfbc34bd (patch)
tree1cd70015b45a432f599036f181dd93c53c59393a /indra/newview/llconversationmodel.cpp
parent6ca4dfdb56d0107368a09af2b089c24d32e7108d (diff)
parentd98fc504a1d4bc292ba86acdda053c8b4598a193 (diff)
Merge pull request #1323 from secondlife/main
Update from main
Diffstat (limited to 'indra/newview/llconversationmodel.cpp')
-rw-r--r--indra/newview/llconversationmodel.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 9ec4fb085b..f152e36cf5 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -37,8 +37,6 @@
#include "llimview.h" //For LLIMModel
#include "lltrans.h"
-#include <boost/foreach.hpp>
-
//
// Conversation items : common behaviors
//
@@ -90,6 +88,8 @@ LLConversationItem::~LLConversationItem()
{
mAvatarNameCacheConnection.disconnect();
}
+
+ clearChildren();
}
//virtual
@@ -254,6 +254,11 @@ LLConversationItemSession::LLConversationItemSession(const LLUUID& uuid, LLFolde
mConvType = CONV_SESSION_UNKNOWN;
}
+LLConversationItemSession::~LLConversationItemSession()
+{
+ clearAndDeparentModels();
+}
+
bool LLConversationItemSession::hasChildren() const
{
return getChildrenCount() > 0;
@@ -293,8 +298,7 @@ void LLConversationItemSession::updateName(LLConversationItemParticipant* partic
// In the case of a P2P conversation, we need to grab the name of the other participant in the session instance itself
// as we do not create participants for such a session.
- LLFolderViewModelItem * itemp;
- BOOST_FOREACH(itemp, mChildren)
+ for (auto itemp : mChildren)
{
LLConversationItem* current_participant = dynamic_cast<LLConversationItem*>(itemp);
// Add the avatar uuid to the list (except if it's the own agent uuid)