mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
data-control-v1: fix crash after wlr_data_control_v1_destroy
This commit is contained in:
parent
99d879c887
commit
1e581ad95c
1 changed files with 4 additions and 1 deletions
|
|
@ -242,8 +242,11 @@ void wlr_data_control_v1_destroy(struct wlr_data_control_v1 *control) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
zwlr_data_control_v1_send_finished(control->resource);
|
zwlr_data_control_v1_send_finished(control->resource);
|
||||||
// Make the resource inert
|
// Make the resources inert
|
||||||
wl_resource_set_user_data(control->resource, NULL);
|
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->seat_destroy.link);
|
||||||
wl_list_remove(&control->link);
|
wl_list_remove(&control->link);
|
||||||
free(control);
|
free(control);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue