Fix segfault in ContentProvider

QCache in ContentProvider handles cleanup for ThreadModel.
Setting NeoChatRoom as parent for ThreadModel caused it to
be deleted outside of QCache control leading to a double-free.
This commit is contained in:
Azhar Momin
2026-02-17 19:30:55 +05:30
committed by Joshua Goins
parent 99aed0993e
commit b42a82a455
3 changed files with 16 additions and 25 deletions

View File

@@ -164,6 +164,8 @@ Q_SIGNALS:
void moreEventsAvailableChanged();
private:
QPointer<NeoChatRoom> m_room;
QString m_threadRootId;
QPointer<MessageContentModel> m_threadRootContentModel;