mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
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...
This commit is contained in:
@@ -259,8 +259,7 @@ API_EXPORTED struct fp_dscv_dev **fp_discover_devs(void)
|
|||||||
int r;
|
int r;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
||||||
if (registered_drivers == NULL)
|
g_return_val_if_fail (registered_drivers != NULL, NULL);
|
||||||
return NULL;
|
|
||||||
|
|
||||||
r = libusb_get_device_list(fpi_usb_ctx, &devs);
|
r = libusb_get_device_list(fpi_usb_ctx, &devs);
|
||||||
if (r < 0) {
|
if (r < 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user