aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-12-12 10:53:27 +0100
committeremersion <contact@emersion.fr>2018-12-30 02:48:03 +0100
commitaa2dafb7c8b3c7ee6ef9ab49a0cc576c68f2768c (patch)
treef081c085fc67adc928da82cc5df77eea2452af0e
parent4423630687397e714183e7e0f690613175fd6df8 (diff)
data-control-v1: fix crash in manager_handle_get_data_control
-rw-r--r--types/wlr_data_control_v1.c3
1 files changed, 2 insertions, 1 deletions
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);