From 9ad64b990d10572700e4cb7b04a8530c23b69db5 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Mon, 4 Aug 2025 23:06:42 +0200 Subject: [PATCH] NotificationsModel: Don't crash if connection is nullptr This can legitimately happen --- src/app/models/notificationsmodel.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/app/models/notificationsmodel.cpp b/src/app/models/notificationsmodel.cpp index 660b86d45..ef5cfaa66 100644 --- a/src/app/models/notificationsmodel.cpp +++ b/src/app/models/notificationsmodel.cpp @@ -92,7 +92,9 @@ void NotificationsModel::setConnection(NeoChatConnection *connection) void NotificationsModel::loadData() { - Q_ASSERT(m_connection); + if (!m_connection) { + return; + } if (m_job || (m_notifications.size() && m_nextToken.isEmpty())) { return; }