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

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