From 3c7715ce30eef6b0f04a3b360826f0b2d674062a Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Mon, 26 Oct 2020 17:59:50 +0000 Subject: [PATCH] Fix crash on drag and drop from xwayland to wayland clients During DataDevice migration we moved dataDevicesForSurface away from the existing template macro due to inheritance reasons at the time. The SeatInterface::setDragTarget() is used with null surfaces --- src/wayland/seat_interface.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wayland/seat_interface.cpp b/src/wayland/seat_interface.cpp index b02a94a378..b86afe8b70 100644 --- a/src/wayland/seat_interface.cpp +++ b/src/wayland/seat_interface.cpp @@ -234,6 +234,9 @@ QVector SeatInterface::Private::touchsForSurface(SurfaceInterf QVector SeatInterface::Private::dataDevicesForSurface(SurfaceInterface *surface) const { + if (!surface) { + return {}; + } QVector primarySelectionDevices; for (auto it = dataDevices.constBegin(); it != dataDevices.constEnd(); ++it) { if ((*it)->client() == *surface->client()) {