Commit 46ebb39f authored by Bastien Nocera's avatar Bastien Nocera
Browse files

lib: Throw an error if fp_init() wasn't called

You can't call fp_discover_devs() without calling fp_init() and having
it not fail, otherwise there's nothing to discover...
parent c88a51cc
......@@ -259,8 +259,7 @@ API_EXPORTED struct fp_dscv_dev **fp_discover_devs(void)
int r;
int i = 0;
if (registered_drivers == NULL)
return NULL;
g_return_val_if_fail (registered_drivers != NULL, NULL);
r = libusb_get_device_list(fpi_usb_ctx, &devs);
if (r < 0) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment