{
g_assert_no_error (error);
- g_variant_ref_sink (value);
+ if (g_variant_is_floating (value))
+ g_variant_ref_sink (value);
reply = g_dbus_message_new_method_reply (data->message);
g_dbus_message_set_body (reply, g_variant_new ("(v)", value));
g_dbus_connection_send_message (data->connection, reply, G_DBUS_SEND_MESSAGE_FLAGS_NONE, NULL, NULL);
if (value == NULL)
continue;
+ if (g_variant_is_floating (value))
+ g_variant_ref_sink (value);
g_variant_builder_add (&builder,
"{sv}",
property_info->name,
value);
+ g_variant_unref (value);
}
g_variant_builder_close (&builder);
*
* The type of the @get_property function in #GDBusInterfaceVTable.
*
- * Returns: A newly-allocated #GVariant with the value for @property_name or %NULL if @error is set.
+ * Returns: A #GVariant with the value for @property_name or %NULL if
+ * @error is set. If the returned #GVariant is floating, it is
+ * consumed - otherwise its reference count is decreased by one.
*
* Since: 2.26
*/