Commit 201410de authored by Mario Sanchez Prada's avatar Mario Sanchez Prada Committed by Matthias Clasen

Missing NULL-check in XI2's implementation for get_window()

Add missing check in gdk_x11_device_manager_xi2_get_window(), returning
NULL if no valid XI2Event* has been found. Calling code seems to be
prepared to handle NULLs coming from this function, so it should be
safe enough (e.g. check gdk_event_source_get_filter_window()).

https://bugzilla.gnome.org/show_bug.cgi?id=700465
parent 678ccd6f
......@@ -1682,6 +1682,8 @@ gdk_x11_device_manager_xi2_get_window (GdkEventTranslator *translator,
return NULL;
ev = (XIEvent *) xevent->xcookie.data;
if (!ev)
return NULL;
get_event_window (translator, ev, &window);
return window;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment