From 08b952ef31bf9034229a57cd798ed91131cea440 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Wed, 1 Jul 2015 01:28:41 +0200 Subject: [PATCH] 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. --- Source/Core/Core/HW/SI_GCAdapter.cpp | 1 + 1 file changed, 1 insertion(+) 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) {