summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindowsysteminterface.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2016-08-09 13:33:14 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2016-08-10 10:23:02 +0000
commitc6cfa2270b6d25921373f959b318d89f7098f710 (patch)
treea1487c2c4618562188a342bdaecaea1e11430961 /src/gui/kernel/qwindowsysteminterface.h
parent89d7c904e5f7c0cd230e59a4cd8b2ee2a1cbcac1 (diff)
evdevtouch: Avoid crashing on exit
26238aca8c442736f380eb523ef48468f892bdb7 causes double deletion of the QTouchDevice in case the post routine already cleaned up the list by the time the touch handler gets to do it. Just check the list of devices to see if the one we hold is still there. If not, the pointer is likely to be a dangling one so do nothing. This will avoid dying with bus error or similar on application exit. Task-number: QTBUG-51562 Change-Id: I50c1edee7405aad308274538219698388c2cc9f9 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface.h')
-rw-r--r--src/gui/kernel/qwindowsysteminterface.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.h b/src/gui/kernel/qwindowsysteminterface.h
index 69c850ad3e..b4f6020fe2 100644
--- a/src/gui/kernel/qwindowsysteminterface.h
+++ b/src/gui/kernel/qwindowsysteminterface.h
@@ -123,6 +123,7 @@ public:
static void registerTouchDevice(const QTouchDevice *device);
static void unregisterTouchDevice(const QTouchDevice *device);
+ static bool isTouchDeviceRegistered(const QTouchDevice *device);
static void handleTouchEvent(QWindow *w, QTouchDevice *device,
const QList<struct TouchPoint> &points, Qt::KeyboardModifiers mods = Qt::NoModifier);
static void handleTouchEvent(QWindow *w, ulong timestamp, QTouchDevice *device,