Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jsfdez committed Feb 15, 2018
1 parent dfffb52 commit 58541d1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/kernel/qguiapplication.cpp
Expand Up @@ -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());
}
Expand Down

0 comments on commit 58541d1

Please sign in to comment.