[gtk+] x11: Add necessary NULL check



commit 3438dcdd4e0282f69f9d31659d7c01a5fab66b0f
Author: Benjamin Otte <otte redhat com>
Date:   Sat Dec 16 02:24:12 2017 +0100

    x11: Add necessary NULL check

 gdk/x11/gdkdevicemanager-xi2.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c
index 40e6aaa..851c52f 100644
--- a/gdk/x11/gdkdevicemanager-xi2.c
+++ b/gdk/x11/gdkdevicemanager-xi2.c
@@ -990,7 +990,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_for_display (gdk_device_get_display (device), "Wacom Serial 
IDs"))
+  if (device != NULL &&
+      ev->property == gdk_x11_get_xatom_by_name_for_display (gdk_device_get_display (device), "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]