From 1f104f62f56e839b49bb772488a86a34484c5410 Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Fri, 4 Dec 2009 09:18:43 +0000 Subject: [PATCH] Force libnotify GObject cleanup even when libnotify fails --- src/GUI.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/GUI.cpp b/src/GUI.cpp index a0ac15a8f..a95141409 100644 --- a/src/GUI.cpp +++ b/src/GUI.cpp @@ -813,12 +813,11 @@ void GUI::showNotificationBaloon(QString title, QString msg) const { NotifyNotification* notification; notification = notify_notification_new (title.toLocal8Bit().data(), msg.toLocal8Bit().data(), "qbittorrent", 0); gboolean success = notify_notification_show (notification, NULL); + g_object_unref(G_OBJECT(notification)); + notify_uninit (); if(success) { - g_object_unref(G_OBJECT(notification)); - notify_uninit (); return; } - notify_uninit (); } #endif if(systrayIcon)