diff options
| author | Thiago Macieira <[email protected]> | 2025-02-17 20:16:55 +0100 |
|---|---|---|
| committer | Liang Qi <[email protected]> | 2025-02-18 02:03:13 +0000 |
| commit | 1040728e39b8b898d6e96b79a4c7bfcd0cb3f027 (patch) | |
| tree | 4540830fba022ff38c7c0bcbdabf88edc70b8703 | |
| parent | 2753924fcbeb29fa5b34782bd6ad6ed4fe4b51f1 (diff) | |
GUI: no need to unregister input device if list is destroyed
Fixes: QTBUG-133776
Pick-to: 6.9 6.8
Change-Id: If4a148e3ebf753ccd661a5ed1b321dbd7751576e
Reviewed-by: Shawn Rutledge <[email protected]>
Reviewed-by: Liang Qi <[email protected]>
| -rw-r--r-- | src/gui/kernel/qinputdevice.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qinputdevice.cpp b/src/gui/kernel/qinputdevice.cpp index 3ef8ad10c7d..25f16c4a7d8 100644 --- a/src/gui/kernel/qinputdevice.cpp +++ b/src/gui/kernel/qinputdevice.cpp @@ -356,6 +356,9 @@ void QInputDevicePrivate::registerDevice(const QInputDevice *dev) */ void QInputDevicePrivate::unregisterDevice(const QInputDevice *dev) { + if (deviceList.isDestroyed()) + return; // nothing to remove! + QMutexLocker lock(&devicesMutex); deviceList()->removeOne(dev); qCInfo(lcQpaInputDevices) << "Unregistered" << dev; |
