mirror of
https://github.com/brl/mutter.git
synced 2025-02-23 00:14:09 +00:00
x11/events: NULL Check input event when getting name
Fixes a SIGSEGV when trying to get the name of an XIEvent for profile trace data gathering. We don't use GDK anymore, so we can't rely on any GDK semantics. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2998>
This commit is contained in:
parent
e4b2b141d9
commit
33a210d768
@ -67,10 +67,9 @@ get_input_event (MetaX11Display *x11_display,
|
||||
{
|
||||
XIEvent *input_event;
|
||||
|
||||
/* NB: GDK event filters already have generic events
|
||||
* allocated, so no need to do XGetEventData() on our own
|
||||
*/
|
||||
input_event = (XIEvent *) event->xcookie.data;
|
||||
if (!input_event)
|
||||
return NULL;
|
||||
|
||||
switch (input_event->evtype)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user