From 18323f019f51a0ca27470ec770232fc4618fcd4b Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 31 Mar 2021 21:45:35 +0300 Subject: SL-15061 Crash deleting non-zero reference in LLConversationItemSession --- indra/newview/llconversationview.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'indra/newview/llconversationview.cpp') diff --git a/indra/newview/llconversationview.cpp b/indra/newview/llconversationview.cpp index 71346b4b43..df16868132 100644 --- a/indra/newview/llconversationview.cpp +++ b/indra/newview/llconversationview.cpp @@ -108,8 +108,7 @@ void LLConversationViewSession::destroyView() // Chat can create and parent models(listeners) to session's model before creating // coresponding views, such participant's models normally will wait for idle cycles // but since we are deleting session and won't be processing any more events, make - // sure unowned models are removed as well. - // Might be good idea to just have an LLPointer list somewhere in LLConversationItemSession + // sure unowned LLConversationItemParticipant models are removed as well. LLConversationItemSession* vmi = dynamic_cast(getViewModelItem()); @@ -146,9 +145,9 @@ void LLConversationViewSession::destroyView() folderp->destroyView(); } - // Now everything that is left in model(listener) is unowned, - // it is safe to remove - vmi->deleteParticipantModels(); + // Now everything that is left in model(listener) is not owned by views, + // only by sessions, deparent so it won't point to soon to be dead model + vmi->clearAndDeparentModels(); } LLFolderViewFolder::destroyView(); -- cgit v1.2.3