diff options
author | Martin Pitt <martin.pitt@ubuntu.com> | 2010-07-01 14:30:54 +0200 |
---|---|---|
committer | William Jon McCann <jmccann@redhat.com> | 2010-07-01 20:38:06 -0400 |
commit | 13d2876bb0319caf716c826f74965ac6fe73b818 (patch) | |
tree | b2fd908f0e8db790d9d090b9d741b3c71601f1af | |
parent | 1fb351b53125f671ebcd137ea23eb63fefa608ca (diff) | |
download | libnotify-13d2876bb0319caf716c826f74965ac6fe73b818.tar.gz |
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)
-rw-r--r-- | 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; } |