summaryrefslogtreecommitdiff
path: root/indra/newview/llconversationmodel.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-01-06 00:45:07 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2021-01-06 01:33:26 +0200
commitf86014ef151c7af64de4a08dc4c320e1743fb34b (patch)
tree96047a3d76efa4ffaa92d6f9d398c4e398b9663b /indra/newview/llconversationmodel.cpp
parentdb161b6f85a266ee9d883e3180874de898ccda0e (diff)
SL-14270 Crash on participant's updateName
Session was deleted before viewer had a chance to create view for listener, so listener ended up not deleted and avaiting an uptade, then tryed to call for deleted session.
Diffstat (limited to 'indra/newview/llconversationmodel.cpp')
-rw-r--r--indra/newview/llconversationmodel.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/indra/newview/llconversationmodel.cpp b/indra/newview/llconversationmodel.cpp
index 8293dc6922..fbdf08d8aa 100644
--- a/indra/newview/llconversationmodel.cpp
+++ b/indra/newview/llconversationmodel.cpp
@@ -349,6 +349,20 @@ void LLConversationItemSession::clearParticipants()
mNeedsRefresh = true;
}
+
+void LLConversationItemSession::deleteParticipantModels()
+{
+ // Make sure that no views exist before use and that view-owned items were removed!
+ //
+ // Normally we are not supposed to delete models directly, they should be
+ // owned by views and this action will result in crashes, but LLParticipantList
+ // creates models separately from views (it probably shouldn't) and then those
+ // models wait for idle cycles to be assigned to view.
+ // this code is meant to delete 'waiting' models
+ std::for_each(mChildren.begin(), mChildren.end(), DeletePointer());
+ mChildren.clear();
+}
+
LLConversationItemParticipant* LLConversationItemSession::findParticipant(const LLUUID& participant_id)
{
// This is *not* a general tree parsing algorithm. It assumes that a session contains only