From 4664b61ae358fdf28156ae93726a885f17fd1fa7 Mon Sep 17 00:00:00 2001 From: Carlos Garnacho <carlosg@gnome.org> Date: Tue, 24 Feb 2015 16:34:53 +0100 Subject: [PATCH 1/2] 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 file changed, 6 insertions(+) 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], -- 2.3.2