[libnotify/0.5] Fix assertion when uniniting without any notifications
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libnotify/0.5] Fix assertion when uniniting without any notifications
- Date: Fri, 2 Jul 2010 00:38:48 +0000 (UTC)
commit 13d2876bb0319caf716c826f74965ac6fe73b818
Author: Martin Pitt <martin pitt ubuntu com>
Date: Thu Jul 1 14:30:54 2010 +0200
Fix assertion when uniniting without any notifications
The lazy initialization from commit 3dc04fa caused a small regression: When a
process would init and uninit libnotify without ever sending a notification,
_proxy was still NULL, which caused an assertion
(process:20953): GLib-GObject-CRITICAL **: g_object_unref: assertion `G_IS_OBJECT (object)' failed
Bug-Ubuntu: https://bugs.launchpad.net/bugs/570462
(cherry picked from commit 1a103f1eee373882a7ed5e2225fcd23bb10ecbc8)
libnotify/notify.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libnotify/notify.c b/libnotify/notify.c
index eaa0205..1f53b39 100644
--- a/libnotify/notify.c
+++ b/libnotify/notify.c
@@ -139,7 +139,9 @@ notify_uninit (void)
}
}
- g_object_unref (_proxy);
+ if (_proxy != NULL) {
+ g_object_unref (_proxy);
+ }
_initted = FALSE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]