x11: Add necessary NULL check

This commit is contained in:
Benjamin Otte 2017-12-16 02:24:12 +01:00
parent 8f6194a883
commit 3438dcdd4e

View File

@ -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;