diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2015-02-24 16:34:53 +0100 |
---|---|---|
committer | Carlos Garnacho <carlosg@gnome.org> | 2015-02-24 16:47:29 +0100 |
commit | 4664b61ae358fdf28156ae93726a885f17fd1fa7 (patch) | |
tree | 6362af63e6ab3d9559a2af46942552a84f96d6e9 | |
parent | 7c92e64ad00686a2f203f1360682d5a5887600e1 (diff) | |
download | gnome-settings-daemon-4664b61ae358fdf28156ae93726a885f17fd1fa7.tar.gz |
wacom: Bail out if no default area could be obtained from the device
This avoids a sure crash afterwards.
-rw-r--r-- | 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 786a6016..f9202351 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], |