Skip to content

Commit

Permalink
Fix segfault when passing invalid arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaVandaele committed Jan 24, 2025
1 parent d0b7c96 commit f1f1479
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/Core/InputCommon/GCAdapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ void Shutdown()
StopScanThread();
#if GCADAPTER_USE_LIBUSB_IMPLEMENTATION
#if LIBUSB_API_HAS_HOTPLUG
if (s_libusb_context->IsValid() && s_libusb_hotplug_enabled)
if (s_libusb_context && s_libusb_context->IsValid() && s_libusb_hotplug_enabled)
libusb_hotplug_deregister_callback(*s_libusb_context, s_hotplug_handle);
#endif
#endif
Expand Down

0 comments on commit f1f1479

Please sign in to comment.