[PATCH] wayland-server: fix crash on invalid resource

Kristian Høgsberg krh at bitplanet.net
Tue Oct 11 10:59:24 PDT 2011


On Wed, Oct 5, 2011 at 4:35 AM, Fiedler, Mathias <Mathias.Fiedler at xse.de> wrote:
>
> Using display_resource to post error about invalid resource.

Thanks, applied.

Kristian

> ---
>  src/wayland-server.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/src/wayland-server.c b/src/wayland-server.c
> index 4ee7796..a6cd88d 100644
> --- a/src/wayland-server.c
> +++ b/src/wayland-server.c
> @@ -158,7 +158,7 @@ wl_client_connection_data(int fd, uint32_t mask, void *data)
>
>                resource = wl_map_lookup(&client->objects, p[0]);
>                if (resource == NULL) {
> -                       wl_resource_post_error(resource,
> +                       wl_resource_post_error(client->display_resource,
>                                               WL_DISPLAY_ERROR_INVALID_OBJECT,
>                                               "invalid object %d", p[0]);
>                        break;
> --
> 1.7.4.1
>
>
>
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
>


More information about the wayland-devel mailing list