sys_usbd: Fix null pointer deref on destruction
This commit is contained in:
@@ -591,7 +591,8 @@ usb_handler_thread::~usb_handler_thread()
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if LIBUSB_API_VERSION >= 0x01000102
|
#if LIBUSB_API_VERSION >= 0x01000102
|
||||||
libusb_hotplug_deregister_callback(ctx, callback_handle);
|
if (ctx && hotplug_supported)
|
||||||
|
libusb_hotplug_deregister_callback(ctx, callback_handle);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (ctx)
|
if (ctx)
|
||||||
|
|||||||
Reference in New Issue
Block a user