diff options
author | Liang Qi <liang.qi@qt.io> | 2016-08-10 17:43:12 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-08-10 17:43:13 +0200 |
commit | 8ba384a5645aebbefe34b814828024d511171497 (patch) | |
tree | 6f6cfe1b849b6e0e02de15ee74ad0f3d5fc740b6 /src/platformsupport/input | |
parent | e694ced803589b3504b6bdb2fc8bf97bc891c794 (diff) | |
parent | 25b72a63fffe800f2005b21d254b0b191d263b10 (diff) |
Merge remote-tracking branch 'origin/5.6' into 5.7
Change-Id: I1a63523de158757964b6fb5ea026cf69a6c5ddcf
Diffstat (limited to 'src/platformsupport/input')
-rw-r--r-- | src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp index 6b98ed30a9..435f411f96 100644 --- a/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp +++ b/src/platformsupport/input/evdevtouch/qevdevtouchhandler.cpp @@ -400,9 +400,13 @@ void QEvdevTouchScreenHandler::unregisterTouchDevice() if (!m_device) return; - QWindowSystemInterface::unregisterTouchDevice(m_device); + // At app exit the cleanup may have already been done, avoid + // double delete by checking the list first. + if (QWindowSystemInterface::isTouchDeviceRegistered(m_device)) { + QWindowSystemInterface::unregisterTouchDevice(m_device); + delete m_device; + } - delete m_device; m_device = Q_NULLPTR; } |