don't crash is surface resource has no e_client

wl_resource_get_user_data(surface_resource) could return NULL if the
surface resource has no user data set. This happens with Ecore_Wl2
Windows which are set to type 'None', so add check for valid e_client.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
devs/yoz/bryce
Chris Michael 7 years ago
parent c9e69e5176
commit fbb17af2d6
  1. 3
      src/bin/e_comp_wl_input.c

@ -69,7 +69,10 @@ _e_comp_wl_input_pointer_cb_cursor_set(struct wl_client *client, struct wl_resou
e_pointer_object_set(e_comp->pointer, NULL, x, y);
return;
}
ec = wl_resource_get_user_data(surface_resource);
if (!ec) return;
if (!ec->re_manage)
{
ec->comp_data->cursor = ec->re_manage = 1;

Loading…
Cancel
Save