[gnome-settings-daemon/gnome-3-14] wacom: Bail out if no default area could be obtained from the device
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon/gnome-3-14] wacom: Bail out if no default area could be obtained from the device
- Date: Tue, 24 Feb 2015 15:51:07 +0000 (UTC)
commit 4664b61ae358fdf28156ae93726a885f17fd1fa7
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Feb 24 16:34:53 2015 +0100
wacom: Bail out if no default area could be obtained from the device
This avoids a sure crash afterwards.
plugins/wacom/gsd-wacom-manager.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-manager.c b/plugins/wacom/gsd-wacom-manager.c
index 786a601..f920235 100644
--- a/plugins/wacom/gsd-wacom-manager.c
+++ b/plugins/wacom/gsd-wacom-manager.c
@@ -322,6 +322,12 @@ set_area (GsdWacomDevice *device,
property.data.i[3] == -1) {
gint *area;
area = gsd_wacom_device_get_default_area (device);
+
+ if (!area) {
+ g_warning ("No default area could be obtained from the device");
+ return;
+ }
+
property.data.i = area;
g_debug ("Resetting area to: %d, %d, %d, %d",
property.data.i[0],
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]