From b5f30143ed9cd26ef7a65003265b8a8c45c1c95b Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Fri, 15 Jul 2011 18:33:44 +0200 Subject: [PATCH] x11: Skip GenericEvents with no cookie data in the xi2 device manager https://bugzilla.gnome.org/show_bug.cgi?id=653947 It could happen that a cookie event has been already allocated/freed in an event filter, as it can't be allocated a second time, all GDK can do is skipping the event. Spotted by Guillaume Desmottes. --- gdk/x11/gdkdevicemanager-xi2.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gdk/x11/gdkdevicemanager-xi2.c b/gdk/x11/gdkdevicemanager-xi2.c index 5bd5500fea..425efeeab9 100644 --- a/gdk/x11/gdkdevicemanager-xi2.c +++ b/gdk/x11/gdkdevicemanager-xi2.c @@ -1025,6 +1025,9 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator, ev = (XIEvent *) cookie->data; + if (!ev) + return FALSE; + window = get_event_window (translator, ev); if (window && GDK_WINDOW_DESTROYED (window))