From aa2dafb7c8b3c7ee6ef9ab49a0cc576c68f2768c Mon Sep 17 00:00:00 2001 From: emersion Date: Wed, 12 Dec 2018 10:53:27 +0100 Subject: [PATCH] data-control-v1: fix crash in manager_handle_get_data_control --- types/wlr_data_control_v1.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/types/wlr_data_control_v1.c b/types/wlr_data_control_v1.c index fcb37d7a..5f7b2df5 100644 --- a/types/wlr_data_control_v1.c +++ b/types/wlr_data_control_v1.c @@ -248,6 +248,7 @@ void wlr_data_control_v1_destroy(struct wlr_data_control_v1 *control) { wl_resource_set_user_data(control->selection_offer_resource, NULL); } wl_list_remove(&control->seat_destroy.link); + wl_list_remove(&control->seat_selection.link); wl_list_remove(&control->link); free(control); } @@ -317,7 +318,7 @@ static void manager_handle_get_data_control(struct wl_client *client, wl_signal_add(&control->seat->events.destroy, &control->seat_destroy); control->seat_selection.notify = control_handle_seat_selection; - wl_signal_add(&control->seat->events.destroy, &control->seat_selection); + wl_signal_add(&control->seat->events.selection, &control->seat_selection); wl_list_insert(&manager->controls, &control->link); wlr_signal_emit_safe(&manager->events.new_control, control);