[gtk/gtk-3-24] x11: Add necessary NULL check
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/gtk-3-24] x11: Add necessary NULL check
- Date: Wed, 20 Jun 2018 18:04:52 +0000 (UTC)
commit 0a37b564d46d5e0cd5f1e4e7877ab8caf270e3de
Author: Benjamin Otte <otte redhat com>
Date: Sat Dec 16 02:24:12 2017 +0100
x11: Add necessary NULL check
(Backported from master 3438dcdd4e0)
gdk/x11/gdkdevicemanager-xi2.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 20cb4f4cbd..ad17ff4a8c 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -1027,7 +1027,8 @@ handle_property_change (GdkX11DeviceManagerXI2 *device_manager,
device = g_hash_table_lookup (device_manager->id_table,
GUINT_TO_POINTER (ev->deviceid));
- if (ev->property == gdk_x11_get_xatom_by_name ("Wacom Serial IDs"))
+ if (device != NULL &&
+ ev->property == gdk_x11_get_xatom_by_name ("Wacom Serial IDs"))
{
GdkDeviceTool *tool = NULL;
guint serial_id = 0, tool_id = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]