Commit cd4c50db authored by Emmanuele Bassi's avatar Emmanuele Bassi

wayland: Protect against enter events for empty surfaces

The `leave` handler checks for NULL surfaces, but the `enter` handler
does not.

Fixes: #17
parent 6dd50fcd
Pipeline #162332 passed with stage
in 1 minute and 33 seconds
......@@ -472,7 +472,10 @@ clutter_wayland_handle_keyboard_enter (void *data,
struct wl_array *keys)
{
ClutterInputDeviceWayland *device = data;
ClutterStageCogl *stage_cogl;
ClutterStageCogl *stage_cogl;
if (surface == NULL)
return;
if (!CLUTTER_IS_STAGE_COGL (wl_surface_get_user_data (surface)))
return;
......@@ -495,8 +498,9 @@ clutter_wayland_handle_keyboard_leave (void *data,
ClutterInputDeviceWayland *device = data;
ClutterStageCogl *stage_cogl;
if (!surface)
if (surface == NULL)
return;
if (!CLUTTER_IS_STAGE_COGL (wl_surface_get_user_data (surface)))
return;
......
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