data-control-v1: fix data source not properly destroyed

This commit is contained in:
emersion 2018-12-12 11:30:34 +01:00
parent a28167c255
commit 340281b48a
No known key found for this signature in database
GPG Key ID: 0FDE7BE0E88F5E48
1 changed files with 1 additions and 0 deletions

View File

@ -36,6 +36,7 @@ static void client_source_cancel(struct wlr_data_source *wlr_source) {
struct client_data_source *source = struct client_data_source *source =
client_data_source_from_source(wlr_source); client_data_source_from_source(wlr_source);
zwlr_data_control_source_v1_send_cancelled(source->resource); zwlr_data_control_source_v1_send_cancelled(source->resource);
wlr_data_source_finish(wlr_source);
// Make the resource inert // Make the resource inert
wl_resource_set_user_data(source->resource, NULL); wl_resource_set_user_data(source->resource, NULL);
free(source); free(source);