[gnome-settings-daemon] wacom: Bail out if no default area could be obtained from the device



commit 549c151932dffb87ab472154ca1d6a2ae64dea72
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 6d83238..0064d99 100644
--- a/plugins/wacom/gsd-wacom-manager.c
+++ b/plugins/wacom/gsd-wacom-manager.c
@@ -324,6 +324,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]