cursor: fix segfault when destroying a wlr_output_layout with a wlr_cursor attached

This commit is contained in:
emersion 2018-01-22 09:29:52 +01:00
parent e5fa4d8e8e
commit f5507ec677
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48

View file

@ -510,7 +510,7 @@ void wlr_cursor_detach_input_device(struct wlr_cursor *cur,
static void handle_layout_destroy(struct wl_listener *listener, void *data) { static void handle_layout_destroy(struct wl_listener *listener, void *data) {
struct wlr_cursor_state *state = struct wlr_cursor_state *state =
wl_container_of(listener, state, layout_change); wl_container_of(listener, state, layout_destroy);
wlr_cursor_detach_output_layout(state->cursor); wlr_cursor_detach_output_layout(state->cursor);
} }