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

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