Commit 87c862a9 authored by Derek Foreman's avatar Derek Foreman Committed by Bryce Harrington

input: when destroying a seat, remove keyboard focus first

If we destroy all the devices before trying to remove keyboard focus
we'll segfault because we destroyed the keyboard.
Signed-off-by: default avatarDerek Foreman <derekf@osg.samsung.com>
Reviewed-by: default avatarRyo Munakata <ryomnktml@gmail.com>
Reviewed-by: default avatarBryce Harrington <bryce@osg.samsung.com>
parent 74a635b1
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment