One minor fix that didn't get into the previous commit

This commit is contained in:
Rachel Blackman 2026-05-26 16:44:42 -07:00
parent 5fc6124d5f
commit a871d5c56d
No known key found for this signature in database

View file

@ -285,9 +285,11 @@ class HIDDeviceUSB implements HIDDevice {
}
mInputThread = null;
}
if (mConnection != null && mClaimed) {
UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
mConnection.releaseInterface(iface);
if (mConnection != null) {
if (mClaimed) {
UsbInterface iface = mDevice.getInterface(mInterfaceIndex);
mConnection.releaseInterface(iface);
}
mConnection.close();
mConnection = null;
mClaimed = false;