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
1 changed files with 2 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue