Merge pull request #13304 from JoshuaVandaele/argsegfault
Fix segfault when passing invalid arguments
This commit is contained in:
commit
0b7f9541d0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue