summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2015-07-01 01:28:41 +0200
committerJules Blok <jules.blok@gmail.com>2015-07-01 23:49:39 +0200
commit6a33f174de618dc698ceba02e792cc6b2dba9732 (patch)
tree8c478654c01fd1b14434d1ec8b504ba121977019 /Source/Core
parent9b95faaed7ca9c50685fe869d59355e771439455 (diff)
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.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/HW/SI_GCAdapter.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/Source/Core/Core/HW/SI_GCAdapter.cpp b/Source/Core/Core/HW/SI_GCAdapter.cpp
index 7115dc3e40..b54c07ef74 100644
--- a/Source/Core/Core/HW/SI_GCAdapter.cpp
+++ b/Source/Core/Core/HW/SI_GCAdapter.cpp
@@ -235,6 +235,7 @@ static bool CheckDeviceAccess(libusb_device* device)
if (ret == LIBUSB_ERROR_NOT_SUPPORTED)
s_libusb_driver_not_supported = true;
}
+ return false;
}
else if ((ret = libusb_kernel_driver_active(s_handle, 0)) == 1)
{