This annoys me when using Valgrind.

Reviewed-by: Ryo Munakata <[email protected]>

Thank you.

On Thu,  6 Aug 2015 12:19:51 -0500
Derek Foreman <[email protected]> wrote:

> If we destroy all the devices before trying to remove keyboard focus
> we'll segfault because we destroyed the keyboard.
> 
> Signed-off-by: Derek Foreman <[email protected]>
> ---
>  src/libinput-seat.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libinput-seat.c b/src/libinput-seat.c
> index e6d44b0..c9f9ed2 100644
> --- a/src/libinput-seat.c
> +++ b/src/libinput-seat.c
> @@ -383,9 +383,10 @@ udev_seat_destroy(struct udev_seat *seat)
>       struct weston_keyboard *keyboard =
>               weston_seat_get_keyboard(&seat->base);
>  
> -     udev_seat_remove_devices(seat);
>       if (keyboard)
>               notify_keyboard_focus_out(&seat->base);
> +
> +     udev_seat_remove_devices(seat);
>       weston_seat_release(&seat->base);
>       wl_list_remove(&seat->output_create_listener.link);
>       free(seat);
> -- 
> 2.4.6

-- 
Ryo Munakata <[email protected]>
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to