summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterimcontainer.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-08-31 21:25:47 +0800
committerErik Kundiman <erik@megapahit.org>2024-09-01 20:43:42 +0800
commit95582654e49422d51b55665c3f2821c848ad1cb8 (patch)
treed6d03a887b8e1b6c3be1b139d63b1638c5d0fdcd /indra/newview/llfloaterimcontainer.cpp
parentab3f483a3e5ed213882a83b882095cfdb6a4de57 (diff)
parentb0fefd62adbf51f32434ba077e9f52d8a9241d15 (diff)
Merge remote-tracking branch 'secondlife/release/2024.08-DeltaFPS' into 2024.08-DeltaFPS
Diffstat (limited to 'indra/newview/llfloaterimcontainer.cpp')
-rw-r--r--indra/newview/llfloaterimcontainer.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/newview/llfloaterimcontainer.cpp b/indra/newview/llfloaterimcontainer.cpp
index cf66507a66..abf15ea9cf 100644
--- a/indra/newview/llfloaterimcontainer.cpp
+++ b/indra/newview/llfloaterimcontainer.cpp
@@ -112,6 +112,18 @@ LLFloaterIMContainer::~LLFloaterIMContainer()
{
LLIMMgr::getInstance()->removeSessionObserver(this);
}
+
+ for (auto& session : mConversationsItems)
+ {
+ LLConversationItemSession* session_model = dynamic_cast<LLConversationItemSession*>(session.second.get());
+ if (session_model)
+ {
+ // Models have overcomplicated double ownership, clear
+ // and resolve '0 references' ownership now, before owned
+ // part of the models gets deleted by their owners
+ session_model->clearAndDeparentModels();
+ }
+ }
}
void LLFloaterIMContainer::sessionAdded(const LLUUID& session_id, const std::string& name, const LLUUID& other_participant_id, bool has_offline_msg)