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();