libusb: prevent crash on driver deinit when there are no pad connections

This commit is contained in:
Brad Parker 2017-11-27 11:10:27 -05:00
parent 4cc7cad454
commit 34491a6025

View File

@ -502,7 +502,8 @@ static void libusb_hid_free(void *data)
sthread_join(hid->poll_thread); sthread_join(hid->poll_thread);
} }
pad_connection_destroy(hid->slots); if (hid->slots)
pad_connection_destroy(hid->slots);
libusb_hotplug_deregister_callback(hid->ctx, hid->hp); libusb_hotplug_deregister_callback(hid->ctx, hid->hp);