img-capture: Exit with error if the device doesn't support capture

This commit is contained in:
Marco Trevisan (Treviño) 2020-06-17 14:12:38 +02:00
parent 1f96077e36
commit a5f4ad507a

View file

@ -162,6 +162,13 @@ main (int argc, const char *argv[])
return EXIT_FAILURE;
}
if (!fp_device_supports_capture (dev))
{
g_warning ("Device %s doesn't support capture",
fp_device_get_name (dev));
return EXIT_FAILURE;
}
capture_data = g_new0 (CaptureData, 1);
capture_data->ret_value = EXIT_FAILURE;
capture_data->loop = g_main_loop_new (NULL, FALSE);