fp-image: Do not start thread detection task thread if already running

This commit is contained in:
Marco Trevisan (Treviño)
2023-11-24 21:02:50 +01:00
parent 2b008b52d7
commit 5a1253e37c

View File

@@ -474,8 +474,11 @@ fp_image_detect_minutiae (FpImage *self,
if (!g_atomic_int_compare_and_exchange (&self->detection_in_progress,
FALSE, TRUE))
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_ADDRESS_IN_USE,
"Minutiae detection is already in progress");
{
g_task_return_new_error (task, G_IO_ERROR, G_IO_ERROR_ADDRESS_IN_USE,
"Minutiae detection is already in progress");
return;
}
g_task_run_in_thread (g_steal_pointer (&task),
fp_image_detect_minutiae_nbis_thread_func);