[libnotify] Fix assertion when uniniting without any notifications
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libnotify] Fix assertion when uniniting without any notifications
- Date: Thu, 1 Jul 2010 12:33:17 +0000 (UTC)
commit 1a103f1eee373882a7ed5e2225fcd23bb10ecbc8
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
libnotify/notify.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libnotify/notify.c b/libnotify/notify.c
index a24a5fd..8491cf1 100644
--- a/libnotify/notify.c
+++ b/libnotify/notify.c
@@ -182,7 +182,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]