Blame SOURCES/0018-Wayland-client-Fix-crash-when-windows-are-shown-hidd.patch

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