From 41845b97d5e81717e4350f16cac9e40ce45a4ae5 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Mon, 2 Sep 2024 12:45:11 +0200 Subject: [PATCH] Fix crash on logout --- src/models/timelinemodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/models/timelinemodel.cpp b/src/models/timelinemodel.cpp index c3a83f224..2f9874728 100644 --- a/src/models/timelinemodel.cpp +++ b/src/models/timelinemodel.cpp @@ -62,7 +62,7 @@ void TimelineBeginningModel::setRoom(NeoChatRoom *room) if (m_room != nullptr) { Quotient::connectUntil(m_room.get(), &Quotient::Room::eventsHistoryJobChanged, this, [this]() { - if (m_room->allHistoryLoaded()) { + if (m_room && m_room->allHistoryLoaded()) { // HACK: We have to do it this way because DelegateChooser doesn't update dynamically. beginRemoveRows({}, 0, 0); endRemoveRows();