diff options
author | Ted Gould <ted@gould.cx> | 2011-02-15 11:42:52 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-02-15 11:42:52 -0600 |
commit | ee4fda3072d31b828c5d607b9ac0a4ab6c7ee320 (patch) | |
tree | ff7d2f7ddccff5356095328799a242547b0d608c | |
parent | 7a7981e687543d6abcf0109bec2551b366906303 (diff) | |
download | libdbusmenu-ee4fda3072d31b828c5d607b9ac0a4ab6c7ee320.tar.gz libdbusmenu-ee4fda3072d31b828c5d607b9ac0a4ab6c7ee320.tar.bz2 libdbusmenu-ee4fda3072d31b828c5d607b9ac0a4ab6c7ee320.zip |
Making sure all refs sink incase of floating variants
-rw-r--r-- | libdbusmenu-glib/client.c | 2 | ||||
-rw-r--r-- | libdbusmenu-glib/menuitem.c | 2 | ||||
-rw-r--r-- | libdbusmenu-glib/server.c | 4 |
3 files changed, 4 insertions, 4 deletions
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 6a9dc23..ba4ae7e 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -1276,7 +1276,7 @@ dbusmenu_client_send_event (DbusmenuClient * client, gint id, const gchar * name edata->event = g_strdup(name); edata->timestamp = timestamp; edata->variant = variant; - g_variant_ref(variant); + g_variant_ref_sink(variant); g_dbus_proxy_call(priv->menuproxy, "Event", diff --git a/libdbusmenu-glib/menuitem.c b/libdbusmenu-glib/menuitem.c index 55d17f1..54d2540 100644 --- a/libdbusmenu-glib/menuitem.c +++ b/libdbusmenu-glib/menuitem.c @@ -1213,7 +1213,7 @@ copy_helper (gpointer in_key, gpointer in_value, gpointer in_data) GHashTable * table = (GHashTable *)in_data; gchar * key = (gchar *)in_key; GVariant * value = (GVariant *)in_value; - g_variant_ref(value); + g_variant_ref_sink(value); g_hash_table_insert(table, g_strdup(key), value); return; } diff --git a/libdbusmenu-glib/server.c b/libdbusmenu-glib/server.c index 2852b7b..aa39991 100644 --- a/libdbusmenu-glib/server.c +++ b/libdbusmenu-glib/server.c @@ -903,7 +903,7 @@ menuitem_property_changed (DbusmenuMenuitem * mi, gchar * property, GVariant * v g_array_append_val(properties, myprop); } if (variant != NULL) { - g_variant_ref(variant); + g_variant_ref_sink(variant); } /* Check to see if the idle is already queued, and queue it @@ -1366,7 +1366,7 @@ bus_event (DbusmenuServer * server, GVariant * params, GDBusMethodInvocation * i event_data->variant = g_variant_get_variant(event_data->variant); } - g_variant_ref(event_data->variant); + g_variant_ref_sink(event_data->variant); g_timeout_add(0, event_local_handler, event_data); |