From 3b19a66dd4dbdd4408ea8e6afe9707c0d652df37 Mon Sep 17 00:00:00 2001 From: Martin Rotter Date: Fri, 15 Mar 2024 13:18:44 +0100 Subject: [PATCH] fix for #1317 --- .../gui/settings/settingsnotifications.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/librssguard/gui/settings/settingsnotifications.cpp b/src/librssguard/gui/settings/settingsnotifications.cpp index a4a50568b..95f24f194 100644 --- a/src/librssguard/gui/settings/settingsnotifications.cpp +++ b/src/librssguard/gui/settings/settingsnotifications.cpp @@ -99,12 +99,16 @@ void SettingsNotifications::saveSettings() { m_ui.m_cbCustomNotificationsPosition->currentData() .value()); - qApp->toastNotifications()->resetNotifications(true); - qApp->toastNotifications()->showNotification(Notification::Event::GeneralEvent, - GuiMessage(tr("How do I look?"), - tr("Just testing new notifications settings. " - "That's all."), - QSystemTrayIcon::MessageIcon::Warning)); + auto* toasts = qApp->toastNotifications(); + + if (toasts != nullptr) { + toasts->resetNotifications(true); + toasts->showNotification(Notification::Event::GeneralEvent, + GuiMessage(tr("How do I look?"), + tr("Just testing new notifications settings. " + "That's all."), + QSystemTrayIcon::MessageIcon::Warning)); + } onEndSaveSettings(); }