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>
This commit is contained in:
parent
13972476ad
commit
033318f7a7
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user