mirror of
https://github.com/palera1n/palera1n.git
synced 2026-10-21 17:57:01 +02:00
fix crash on no usb ports
This commit is contained in:
1 parent
d4052bfe6e
commit
fe970cfe2c
1 file changed
+12
+12
@@ -109,6 +109,18 @@ int palera1n(int argc, char *argv[]) {
|
||||
else goto normal_exit;
|
||||
}
|
||||
#endif
|
||||
#ifdef USE_LIBUSB
|
||||
{
|
||||
int test_libusb = libusb_init(NULL);
|
||||
if (test_libusb) {
|
||||
LOG(LOG_ERROR, "cannot initialize libusb: %d (%s)\n", test_libusb, libusb_strerror(test_libusb));
|
||||
libusb_exit(NULL);
|
||||
goto cleanup;
|
||||
}
|
||||
libusb_exit(NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!checkrain_option_enabled(host_flags, host_option_device_info))
|
||||
LOG(LOG_INFO, "Waiting for devices");
|
||||
|
||||
|
||||
Reference in new issue
Block a user