[Bf-blender-cvs] [ff286a9fcfd] master: Fix double-free after drag & drop with GHOST/Wayland

Campbell Barton noreply at git.blender.org
Thu Aug 4 14:34:20 CEST 2022


Commit: ff286a9fcfd13f264258f807dcea8f9aa5328d96
Author: Campbell Barton
Date:   Thu Aug 4 22:33:25 2022 +1000
Branches: master
https://developer.blender.org/rBff286a9fcfd13f264258f807dcea8f9aa5328d96

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

Resolve crash on exit after drag & drop in Wayland.

===================================================================

M	intern/ghost/intern/GHOST_SystemWayland.cpp

===================================================================

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;



More information about the Bf-blender-cvs mailing list