clutter/clutter-xi2-crash.patch
2013-01-30 11:16:30 -05:00

27 lines
1.2 KiB
Diff

diff --git a/clutter/x11/clutter-device-manager-xi2.c b/clutter/x11/clutter-device-manager-xi2.c
index 73e99af..b5bf2e4 100644
--- a/clutter/x11/clutter-device-manager-xi2.c
+++ b/clutter/x11/clutter-device-manager-xi2.c
@@ -733,12 +733,15 @@ clutter_device_manager_xi2_translate_event (ClutterEventTranslator *translator,
device = g_hash_table_lookup (manager_xi2->devices_by_id,
GINT_TO_POINTER (xev->deviceid));
- _clutter_input_device_reset_axes (device);
- _clutter_input_device_reset_scroll_info (device);
- translate_device_classes (backend_x11->xdpy,
- device,
- xev->classes,
- xev->num_classes);
+ if (device)
+ {
+ _clutter_input_device_reset_axes (device);
+ _clutter_input_device_reset_scroll_info (device);
+ translate_device_classes (backend_x11->xdpy,
+ device,
+ xev->classes,
+ xev->num_classes);
+ }
}
retval = CLUTTER_TRANSLATE_REMOVE;
break;