mirror of
https://gitlab.freedesktop.org/wayland/weston
synced 2024-10-15 16:43:57 +00:00
input: Don't try to send axis_source when there are no resources
The focus_client pointer may be NULL here if the focused client has no pointer resources. To avoid a crash, NULL check focus client before proceeding to send the events. https://bugs.freedesktop.org/show_bug.cgi?id=94899 Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Reviewed-by: Mike Blumenkrantz <zmike@osg.samsung.com>
This commit is contained in:
parent
8b6c9fcd4e
commit
ed6014a9e4
|
@ -367,6 +367,9 @@ weston_pointer_send_axis_source(struct weston_pointer *pointer, uint32_t source)
|
|||
struct wl_resource *resource;
|
||||
struct wl_list *resource_list;
|
||||
|
||||
if (!pointer->focus_client)
|
||||
return;
|
||||
|
||||
resource_list = &pointer->focus_client->pointer_resources;
|
||||
wl_resource_for_each(resource, resource_list) {
|
||||
if (wl_resource_get_version(resource) >=
|
||||
|
|
Loading…
Reference in a new issue