diff options
author | Jason Haslam <jason@scitools.com> | 2014-11-21 14:33:59 -0700 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@digia.com> | 2014-12-23 10:11:08 +0100 |
commit | 033318f7a747ee2630542bed37df7e3fc10a0fb1 (patch) | |
tree | 156c5857f03a4df5b8452b617575bca51525fdfd /src/gui/kernel | |
parent | 13972476ad2c3178fe89f2d96f398de10394c6f6 (diff) |
Check for valid receiver before sending gesture events.
Gesture events sent to a disappearing tooltip can crash. This can most
easily be seen by scrolling over a tooltip on OSX with a magic mouse
middle scroll gesture.
Task-number: QTBUG-42826
Change-Id: Id5510895f63297ca157e3d24a3f4e3a6034586e8
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index e3f4794e6d..dc5501eaf5 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -2168,6 +2168,9 @@ void QGuiApplicationPrivate::processTabletLeaveProximityEvent(QWindowSystemInter #ifndef QT_NO_GESTURES void QGuiApplicationPrivate::processGestureEvent(QWindowSystemInterfacePrivate::GestureEvent *e) { + if (e->window.isNull()) + return; + QNativeGestureEvent ev(e->type, e->pos, e->pos, e->globalPos, e->realValue, e->sequenceId, e->intValue); ev.setTimestamp(e->timestamp); QGuiApplication::sendSpontaneousEvent(e->window, &ev); |