Fix double-free after drag & drop with GHOST/Wayland

Resolve crash on exit after drag & drop in Wayland.
This commit is contained in:
Campbell Barton 2022-08-04 22:33:25 +10:00
parent a95103f6f4
commit ff286a9fcf
1 changed files with 3 additions and 0 deletions

View File

@ -1221,6 +1221,9 @@ static void data_device_handle_drop(void *data, struct wl_data_device * /*wl_dat
wl_data_offer_finish(data_offer->id);
wl_data_offer_destroy(data_offer->id);
if (input->data_offer_dnd == data_offer) {
input->data_offer_dnd = nullptr;
}
delete data_offer;
data_offer = nullptr;