image: Check for task success rather than just cancellation
The minutiae detection might fail and we must not copy any data at that point. So check g_task_had_error to ensure that we only do so when the task was successful. Fixes: #251
This commit is contained in:
parent
f71045b743
commit
5d5995f201
1 changed files with 1 additions and 3 deletions
|
@ -184,10 +184,8 @@ fp_image_detect_minutiae_cb (GObject *source_object,
|
|||
GTask *task = G_TASK (res);
|
||||
FpImage *image;
|
||||
DetectMinutiaeData *data = g_task_get_task_data (task);
|
||||
GCancellable *cancellable;
|
||||
|
||||
cancellable = g_task_get_cancellable (task);
|
||||
if (!cancellable || !g_cancellable_is_cancelled (cancellable))
|
||||
if (!g_task_had_error (task))
|
||||
{
|
||||
gint i;
|
||||
image = FP_IMAGE (source_object);
|
||||
|
|
Loading…
Reference in a new issue