[gnome-settings-daemon] wacom: Return NULL area if there is no backing GdkDevice
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-settings-daemon] wacom: Return NULL area if there is no backing GdkDevice
- Date: Tue, 24 Feb 2015 15:42:28 +0000 (UTC)
commit ee9dac12056c942b9d3853bd7160bd7b70ad9944
Author: Carlos Garnacho <carlosg gnome org>
Date: Tue Feb 24 16:36:37 2015 +0100
wacom: Return NULL area if there is no backing GdkDevice
This may be true for testing GsdWacomDevices, which would cause warnings
there.
plugins/wacom/gsd-wacom-device.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/plugins/wacom/gsd-wacom-device.c b/plugins/wacom/gsd-wacom-device.c
index 4c33052..6ac68ea 100644
--- a/plugins/wacom/gsd-wacom-device.c
+++ b/plugins/wacom/gsd-wacom-device.c
@@ -1936,6 +1936,9 @@ gsd_wacom_device_get_default_area (GsdWacomDevice *device)
g_return_val_if_fail (GSD_IS_WACOM_DEVICE (device), NULL);
+ if (!device->priv->gdk_device)
+ return NULL;
+
g_object_get (device->priv->gdk_device, "device-id", &id, NULL);
device_area = g_new0 (int, 4);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]