GUI: no need to unregister input device if list is destroyed
Fixes: QTBUG-133776 Pick-to: 6.8 Change-Id: If4a148e3ebf753ccd661a5ed1b321dbd7751576e Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io> (cherry picked from commit 1040728e39b8b898d6e96b79a4c7bfcd0cb3f027) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
e20364d6c9
commit
6ad615cd12
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user