mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-04-26 15:24:55 +00:00
GC Adapter: Do not attempt to claim_interface when libusb_open() returns an error.
Fixes a crash / nullptr dereference when the adapter is plugged in but no drivers are installed for it, on Windows.
This commit is contained in:
parent
9b95faaed7
commit
6a33f174de
1 changed files with 1 additions and 0 deletions
|
@ -235,6 +235,7 @@ static bool CheckDeviceAccess(libusb_device* device)
|
||||||
if (ret == LIBUSB_ERROR_NOT_SUPPORTED)
|
if (ret == LIBUSB_ERROR_NOT_SUPPORTED)
|
||||||
s_libusb_driver_not_supported = true;
|
s_libusb_driver_not_supported = true;
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
else if ((ret = libusb_kernel_driver_active(s_handle, 0)) == 1)
|
else if ((ret = libusb_kernel_driver_active(s_handle, 0)) == 1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue