summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJesus Fernandez <jesus.fernandez@qt.io>2018-01-23 12:39:48 +0100
committerJesus Fernandez <Jesus.Fernandez@qt.io>2018-02-15 11:36:18 +0000
commit58541d1c68fcf121318fe153e1469b9d0ebfec63 (patch)
tree18564de55b709fcb87b6d9097c57c84291301a0f /src
parentdfffb5299bf83b87607f28f55afaf3c404910f9f (diff)
QGuiApplicationPrivate::processDrag(): Add assert
CID 186303 (#1 of 3): Dereference after null check (FORWARD_NULL) var_deref_model: Passing null pointer w to sendEvent, which dereferences it. Coverity-Id: 186303 Change-Id: If398165858b91508ccdf4be0c239d6bb104d78fa Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qguiapplication.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 25818b456a..9da325f46e 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -2882,7 +2882,8 @@ QPlatformDragQtResponse QGuiApplicationPrivate::processDrag(QWindow *w, const QM
static QPointer<QWindow> currentDragWindow;
static Qt::DropAction lastAcceptedDropAction = Qt::IgnoreAction;
QPlatformDrag *platformDrag = platformIntegration()->drag();
- if (!platformDrag || (w && w->d_func()->blockedByModalWindow)) {
+ Q_ASSERT(w);
+ if (!platformDrag || w->d_func()->blockedByModalWindow) {
lastAcceptedDropAction = Qt::IgnoreAction;
return QPlatformDragQtResponse(false, lastAcceptedDropAction, QRect());
}