examples: Don't try to save an image from a print without it
A device may produce both prints with image data and not, so only do it in the case the prints contains image data
This commit is contained in:
parent
ed26976ac5
commit
1f96077e36
2 changed files with 2 additions and 2 deletions
|
@ -112,7 +112,7 @@ on_enroll_progress (FpDevice *device,
|
|||
return;
|
||||
}
|
||||
|
||||
if (fp_device_supports_capture (device) &&
|
||||
if (print && fp_print_get_image (print) &&
|
||||
print_image_save (print, "enrolled.pgm"))
|
||||
printf ("Wrote scanned image to enrolled.pgm\n");
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ on_match_cb (FpDevice *dev, FpPrint *match, FpPrint *print,
|
|||
return;
|
||||
}
|
||||
|
||||
if (print && fp_device_supports_capture (dev) &&
|
||||
if (print && fp_print_get_image (print) &&
|
||||
print_image_save (print, "verify.pgm"))
|
||||
g_print ("Print image saved as verify.pgm\n");
|
||||
|
||||
|
|
Loading…
Reference in a new issue