aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-12-12 09:53:36 +0100
committeremersion <contact@emersion.fr>2018-12-30 02:48:03 +0100
commit1e581ad95cfb50acf6b251c7d3da209ea32ca8d7 (patch)
tree6874b572a08a0d60fbd0f80ffcb1d7dbcee9df21
parent99d879c8878f774aac66e39d7bf4b92f3ae7f0ed (diff)
data-control-v1: fix crash after wlr_data_control_v1_destroy
-rw-r--r--types/wlr_data_control_v1.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/types/wlr_data_control_v1.c b/types/wlr_data_control_v1.c
index 8d90074a..fcb37d7a 100644
--- a/types/wlr_data_control_v1.c
+++ b/types/wlr_data_control_v1.c
@@ -242,8 +242,11 @@ void wlr_data_control_v1_destroy(struct wlr_data_control_v1 *control) {
return;
}
zwlr_data_control_v1_send_finished(control->resource);
- // Make the resource inert
+ // Make the resources inert
wl_resource_set_user_data(control->resource, NULL);
+ if (control->selection_offer_resource != NULL) {
+ wl_resource_set_user_data(control->selection_offer_resource, NULL);
+ }
wl_list_remove(&control->seat_destroy.link);
wl_list_remove(&control->link);
free(control);