mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2026-05-05 19:28:02 +02: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:
parent
f03d9361e3
commit
7f6ab61292
1 changed files with 8 additions and 0 deletions
|
|
@ -1400,6 +1400,14 @@ fp_device_identify (FpDevice *device,
|
|||
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_task = g_steal_pointer (&task);
|
||||
setup_task_cancellable (device);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue