Skip to content

Commit

Permalink
SL-15061 Crash at LLConversationItemSession::clearAndDeparentModels #3
Browse files Browse the repository at this point in the history
  • Loading branch information
akleshchev committed Aug 20, 2024
1 parent 169599f commit 342eee5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions indra/newview/llfloaterimcontainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 342eee5

Please sign in to comment.