[gnome-settings-daemon] wacom: Unref only when done with variables
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Unref only when done with variables
- Date: Thu, 23 Feb 2012 09:58:35 +0000 (UTC)
commit e1ae5883eeccfe01c86a292eb471e435f454fb36
Author: Jason Gerecke <killertofu gmail com>
Date: Wed Feb 22 17:23:18 2012 -0800
wacom: Unref only when done with variables
The GVariants provided to set_area and set_presssurecurve are
unref-ed before the final use of the reference.
https://bugzilla.gnome.org/show_bug.cgi?id=670654
plugins/wacom/gsd-wacom-manager.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-manager.c b/plugins/wacom/gsd-wacom-manager.c
index 5019462..e6bd680 100644
--- a/plugins/wacom/gsd-wacom-manager.c
+++ b/plugins/wacom/gsd-wacom-manager.c
@@ -192,7 +192,6 @@ set_pressurecurve (GsdWacomDevice *device,
gsize nvalues;
property.data.i = g_variant_get_fixed_array (value, &nvalues, sizeof (gint32));
- g_variant_unref (value);
if (nvalues != 4) {
g_error ("Pressurecurve requires 4 values.");
@@ -200,6 +199,7 @@ set_pressurecurve (GsdWacomDevice *device,
}
wacom_set_property (device, &property);
+ g_variant_unref (value);
}
/* Area handling. Each area is defined as top x/y, bottom x/y and limits the
@@ -218,7 +218,6 @@ set_area (GsdWacomDevice *device,
gsize nvalues;
property.data.i = g_variant_get_fixed_array (value, &nvalues, sizeof (gint32));
- g_variant_unref (value);
if (nvalues != 4) {
g_error ("Area configuration requires 4 values.");
@@ -226,6 +225,7 @@ set_area (GsdWacomDevice *device,
}
wacom_set_property (device, &property);
+ g_variant_unref (value);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]