From 5caa28c1a3e18dc7a763b69303a7b3c8557c0eba Mon Sep 17 00:00:00 2001 From: David Redondo Date: Mon, 7 Feb 2022 13:17:34 +0100 Subject: [PATCH] xwayland: Guard against offers arriving after leaving surface If the XdndEnter message is handled after leaving the current wayland surface m_visit will be null. BUG:449644 --- src/xwl/drag_x.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xwl/drag_x.cpp b/src/xwl/drag_x.cpp index fe0acb07ee..f7e55c2841 100644 --- a/src/xwl/drag_x.cpp +++ b/src/xwl/drag_x.cpp @@ -214,6 +214,10 @@ using Mime = QPair; void XToWlDrag::setDragTarget() { + if (!m_visit) { + return; + } + auto *ac = m_visit->target(); auto seat = waylandServer()->seat();