GUI: no need to unregister input device if list is destroyed
Fixes: QTBUG-133776 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> (cherry picked from commit 6ad615cd1218a9b7f4204c04288ae2d6ed6c232b)bb10
parent
7b129e5668
commit
c46ac58ea3
|
|
@ -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…
Reference in New Issue