mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
fp-device: Return an error if prints are invalid
We'd crash later otherwise, while it's better to return an error.
This commit is contained in:
@@ -1400,6 +1400,14 @@ fp_device_identify (FpDevice *device,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (prints == NULL)
|
||||||
|
{
|
||||||
|
g_task_return_error (task,
|
||||||
|
fpi_device_error_new_msg (FP_DEVICE_ERROR_DATA_INVALID,
|
||||||
|
"Invalid gallery array"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
priv->current_action = FPI_DEVICE_ACTION_IDENTIFY;
|
priv->current_action = FPI_DEVICE_ACTION_IDENTIFY;
|
||||||
priv->current_task = g_steal_pointer (&task);
|
priv->current_task = g_steal_pointer (&task);
|
||||||
setup_task_cancellable (device);
|
setup_task_cancellable (device);
|
||||||
|
|||||||
Reference in New Issue
Block a user