aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog9
-rw-r--r--libdbusmenu-glib/menuitem.c13
2 files changed, 19 insertions, 3 deletions
diff --git a/debian/changelog b/debian/changelog
index ab00694..132e39d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,6 @@
-libdbusmenu (0.3.99-0ubuntu1~ppa1) natty; urgency=low
+libdbusmenu (0.3.99-0ubuntu1) natty; urgency=low
+ [ Ted Gould ]
* New upstream release.
* Add a signal on the menuitem for generic event support
* Handle the case of a single NULL entry as well.
@@ -18,7 +19,11 @@ libdbusmenu (0.3.99-0ubuntu1~ppa1) natty; urgency=low
* Resolving property changes by looking at the properties
directly.
- -- Ted Gould <ted@ubuntu.com> Thu, 24 Feb 2011 15:16:43 -0600
+ [ Ken VanDine ]
+ * libdbusmenu-glib/menuitem.c
+ - Making sure to grab the variant and dispose of it in handle_event.
+
+ -- Ken VanDine <ken.vandine@canonical.com> Thu, 24 Feb 2011 22:54:54 -0500
libdbusmenu (0.3.98-0ubuntu4) natty; urgency=low
diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c
index 5202aa1..34147a3 100644
--- a/libdbusmenu-glib/menuitem.c
+++ b/libdbusmenu-glib/menuitem.c
@@ -1670,11 +1670,22 @@ dbusmenu_menuitem_handle_event (DbusmenuMenuitem * mi, const gchar * name, GVari
#endif
DbusmenuMenuitemClass * class = DBUSMENU_MENUITEM_GET_CLASS(mi);
+ /* We need to keep a ref to the variant because the signal
+ handler will drop the floating ref and then we'll be up
+ a creek if we don't have our own later. */
+ if (variant != NULL) {
+ g_variant_ref_sink(variant);
+ }
+
gboolean handled = FALSE;
g_signal_emit(G_OBJECT(mi), signals[EVENT], g_quark_from_string(name), name, variant, timestamp, &handled);
if (!handled && class->handle_event != NULL) {
- return class->handle_event(mi, name, variant, timestamp);
+ class->handle_event(mi, name, variant, timestamp);
+ }
+
+ if (variant != NULL) {
+ g_variant_unref(variant);
}
return;