From 19d0878e56094b5cced1154ce07f566f2b147e2a Mon Sep 17 00:00:00 2001 From: Paul Olav Tvete Date: Tue, 14 Sep 2021 11:56:23 +0200 Subject: [PATCH 12/38] Wayland client: Fix crash when windows are shown/hidden during drag Fixes: QTBUG-87624 Pick-to: 6.2 5.15 Change-Id: I1b9443df091878abcd4fbe9c55927cb819aebd59 Reviewed-by: David Edmundson (cherry picked from commit c64c5d3849b40617e1de0295f8690f354cab2b3a) --- src/client/qwaylanddatadevice.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/client/qwaylanddatadevice.cpp b/src/client/qwaylanddatadevice.cpp index 54a69c3c..bbd2d568 100644 --- a/src/client/qwaylanddatadevice.cpp +++ b/src/client/qwaylanddatadevice.cpp @@ -169,7 +169,7 @@ void QWaylandDataDevice::data_device_drop() void QWaylandDataDevice::data_device_enter(uint32_t serial, wl_surface *surface, wl_fixed_t x, wl_fixed_t y, wl_data_offer *id) { - auto *dragWaylandWindow = QWaylandWindow::fromWlSurface(surface); + auto *dragWaylandWindow = surface ? QWaylandWindow::fromWlSurface(surface) : nullptr; if (!dragWaylandWindow) return; // Ignore foreign surfaces -- 2.36.1