diff --git a/libfprint/fpi-async.c b/libfprint/fpi-async.c index 14a8bbd..9e89e3e 100644 --- a/libfprint/fpi-async.c +++ b/libfprint/fpi-async.c @@ -21,6 +21,7 @@ #include "fp_internal.h" #include "fpi-async.h" +#include "fpi-poll.h" #include #include @@ -162,6 +163,7 @@ API_EXPORTED int fp_async_enroll_start(struct fp_dev *dev, int r; g_return_val_if_fail(dev != NULL, -ENODEV); + g_return_val_if_fail (fpi_poll_is_setup(), -EIO); drv = dev->drv; @@ -270,6 +272,7 @@ API_EXPORTED int fp_async_verify_start(struct fp_dev *dev, int r; g_return_val_if_fail(dev != NULL, -ENODEV); + g_return_val_if_fail (fpi_poll_is_setup(), -EIO); drv = dev->drv; @@ -396,6 +399,7 @@ API_EXPORTED int fp_async_identify_start(struct fp_dev *dev, int r; g_return_val_if_fail(dev != NULL, -ENODEV); + g_return_val_if_fail (fpi_poll_is_setup(), -EIO); drv = dev->drv; @@ -522,6 +526,7 @@ API_EXPORTED int fp_async_capture_start(struct fp_dev *dev, int unconditional, int r; g_return_val_if_fail(dev != NULL, -ENODEV); + g_return_val_if_fail (fpi_poll_is_setup(), -EIO); drv = dev->drv;