diff options
Diffstat (limited to 'src/gui/kernel/qsimpledrag.cpp')
-rw-r--r-- | src/gui/kernel/qsimpledrag.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp index f6912a2d57..dcf476e4fe 100644 --- a/src/gui/kernel/qsimpledrag.cpp +++ b/src/gui/kernel/qsimpledrag.cpp @@ -324,9 +324,10 @@ void QSimpleDrag::startDrag() void QSimpleDrag::cancel() { QBasicDrag::cancel(); - if (drag()) + if (drag() && m_current_window) { QWindowSystemInterface::handleDrag(m_current_window, 0, QPoint(), Qt::IgnoreAction); - m_current_window = 0; + m_current_window = 0; + } } void QSimpleDrag::move(const QMouseEvent *me) |