[PATCH weston 4/4] input: Don't try to send axis_source when there are no resources

Mike Blumenkrantz michael.blumenkrantz at gmail.com
Thu Apr 21 15:32:56 UTC 2016


Functionally Reviewed-By: Mike Blumenkrantz <zmike at osg.samsung.com> but the
commit message is a bit confusing

On Wed, Apr 20, 2016 at 11:11 PM Jonas Ådahl <jadahl at gmail.com> wrote:

> We miss to NULL check the focus_client, which is only non-NULL when
> there the focused client has any resources.
>
> https://bugs.freedesktop.org/show_bug.cgi?id=94899
>
> Signed-off-by: Jonas Ådahl <jadahl at gmail.com>
> ---
>  src/input.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/src/input.c b/src/input.c
> index c881792..8fe898c 100644
> --- a/src/input.c
> +++ b/src/input.c
> @@ -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) >=
> --
> 2.5.5
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/wayland-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/wayland-devel/attachments/20160421/41d425bc/attachment.html>


More information about the wayland-devel mailing list