From 9362dbd6bded3dcc6f67063c5d20483749082c72 Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Sun, 5 Nov 2006 20:07:37 +0000 Subject: [PATCH] Patch by Giacomo Lozito to fix a problem where the dbus proxy was not being freed on notify_uninit, which led to problems when libnotify was used in a loadable module. This fixes bug #92. --- ChangeLog | 7 +++++++ NEWS | 2 ++ libnotify/notify.c | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/ChangeLog b/ChangeLog index 066c866..f75b7dc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Sun Nov 05 12:06:01 PST 2006 Christian Hammond + + * libnotify/notify.c: + - Patch by Giacomo Lozito to fix a problem where the dbus proxy was + not being freed on notify_uninit, which led to problems when libnotify + was used in a loadable module. This fixes bug #92. + Sun Nov 05 11:54:10 PST 2006 Christian Hammond * configure.ac: diff --git a/NEWS b/NEWS index 475f021..68e4d61 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,8 @@ version 0.4.4: * Fixed a bug where a notification's ID could be reset when a different notification was closed. Patch by jylefort. (Bug #94) + * Fixed a crash when the D-BUS proxy was not being freed on notify_uninit, + which was problematic when used in a loadable module. (Bug #92) version 0.4.3 (8-October-2006): * Fixed the raw image data support to send the correct array type. diff --git a/libnotify/notify.c b/libnotify/notify.c index d5dd541..abd9cb2 100644 --- a/libnotify/notify.c +++ b/libnotify/notify.c @@ -120,6 +120,9 @@ notify_uninit(void) { GList *l; + if (!_initted) + return; + if (_app_name != NULL) { g_free(_app_name); @@ -137,6 +140,8 @@ notify_uninit(void) } } + g_object_unref(_proxy); + _initted = FALSE; }