From 1f5a764cf506c87b2e94aaff1739656ba3e9f21b Mon Sep 17 00:00:00 2001 From: Dennis Felsing Date: Sun, 8 Oct 2023 14:01:02 +0200 Subject: [PATCH] Make sure notification object exists --- src/engine/client/notifications.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/engine/client/notifications.cpp b/src/engine/client/notifications.cpp index 8153815d7..4cacd6519 100644 --- a/src/engine/client/notifications.cpp +++ b/src/engine/client/notifications.cpp @@ -17,8 +17,11 @@ void NotificationsUninit() void NotificationsNotify(const char *pTitle, const char *pMessage) { NotifyNotification *pNotif = notify_notification_new(pTitle, pMessage, "ddnet"); - notify_notification_show(pNotif, NULL); - g_object_unref(G_OBJECT(pNotif)); + if(pNotif) + { + notify_notification_show(pNotif, NULL); + g_object_unref(G_OBJECT(pNotif)); + } } #else void NotificationsInit()