NotificationsModel: Don't crash if connection is nullptr

This can legitimately happen
This commit is contained in:
Tobias Fella
2025-08-04 23:06:42 +02:00
committed by Tobias Fella
parent 1ceffe6a2e
commit 9ad64b990d

View File

@@ -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;
}