client: Fix crash on data_device_motion

When a window is closed/destroyed, a motion message can still be received
that was send by the compositor before closing the window.

Pick-to: 6.8
Change-Id: I49cfdcf9a4143df5c090dfb93f2920879ae43f80
Reviewed-by: David Edmundson <davidedmundson@kde.org>
This commit is contained in:
David Redondo 2024-11-06 09:52:59 +01:00
parent 92ec75ba8b
commit 8b86bbe81f

View File

@ -257,6 +257,9 @@ void QWaylandDataDevice::data_device_motion(uint32_t time, wl_fixed_t x, wl_fixe
if (!drag && !m_dragOffer)
return;
if (!m_dragWindow)
return;
m_dragPoint = calculateDragPosition(x, y, m_dragWindow);
QMimeData *dragData = nullptr;