From ff286a9fcfd13f264258f807dcea8f9aa5328d96 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 4 Aug 2022 22:33:25 +1000 Subject: [PATCH] Fix double-free after drag & drop with GHOST/Wayland Resolve crash on exit after drag & drop in Wayland. --- intern/ghost/intern/GHOST_SystemWayland.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/intern/ghost/intern/GHOST_SystemWayland.cpp b/intern/ghost/intern/GHOST_SystemWayland.cpp index e6366d25788..627b97a9190 100644 --- a/intern/ghost/intern/GHOST_SystemWayland.cpp +++ b/intern/ghost/intern/GHOST_SystemWayland.cpp @@ -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;