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 <shawn.rutledge@qt.io> Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
parent
2753924fcb
commit
1040728e39
@ -356,6 +356,9 @@ void QInputDevicePrivate::registerDevice(const QInputDevice *dev)
|
|||||||
*/
|
*/
|
||||||
void QInputDevicePrivate::unregisterDevice(const QInputDevice *dev)
|
void QInputDevicePrivate::unregisterDevice(const QInputDevice *dev)
|
||||||
{
|
{
|
||||||
|
if (deviceList.isDestroyed())
|
||||||
|
return; // nothing to remove!
|
||||||
|
|
||||||
QMutexLocker lock(&devicesMutex);
|
QMutexLocker lock(&devicesMutex);
|
||||||
deviceList()->removeOne(dev);
|
deviceList()->removeOne(dev);
|
||||||
qCInfo(lcQpaInputDevices) << "Unregistered" << dev;
|
qCInfo(lcQpaInputDevices) << "Unregistered" << dev;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user