From 74c1b0f336b428a7bb70c0141b92025cbd1da954 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 29 Oct 2020 09:05:06 +0200 Subject: [PATCH] Store dnd icon surface in a QPointer If the drag-and-drop icon has been destroyed, return a nullptr rather than a dangling pointer. BUG: 428399 --- src/wayland/datadevice_interface.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wayland/datadevice_interface.cpp b/src/wayland/datadevice_interface.cpp index 0ca4400875..8b28d25f15 100644 --- a/src/wayland/datadevice_interface.cpp +++ b/src/wayland/datadevice_interface.cpp @@ -29,8 +29,7 @@ public: SeatInterface *seat; DataSourceInterface *source = nullptr; SurfaceInterface *surface = nullptr; - SurfaceInterface *icon = nullptr; - + QPointer icon; QPointer selection; struct Drag {