Commit 1f96077e authored by Marco Trevisan's avatar Marco Trevisan
Browse files

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
parent ed26976a
......@@ -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");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment