mirror of
https://gitlab.freedesktop.org/libfprint/libfprint.git
synced 2025-11-15 07:38:12 +00:00
examples: Check whether the returned date is valid
Prints may have an invalid date. Extend the checks so that this is also caught in addition to a NULL date.
This commit is contained in:
@@ -161,7 +161,7 @@ on_list_completed (FpDevice *dev,
|
||||
finger_to_string (fp_print_get_finger (print)),
|
||||
fp_print_get_username (print));
|
||||
|
||||
if (date)
|
||||
if (date && g_date_valid (date))
|
||||
{
|
||||
g_date_strftime (buf, G_N_ELEMENTS (buf), "%Y-%m-%d\0", date);
|
||||
g_print (", enrolled on %s", buf);
|
||||
|
||||
Reference in New Issue
Block a user