]> www.fi.muni.cz Git - evince.git/blobdiff - properties/ev-properties-view.c
Check if date is invalid. Fix for bug 318134.
[evince.git] / properties / ev-properties-view.c
index 669421fdf8370815ba83b4a6bff7d9f3a7578cf8..fdf5cf7397b5dd6eb360fa929de91ba933af516b 100644 (file)
@@ -110,7 +110,7 @@ ev_properties_view_format_date (GTime utime)
        const char *fmt_hack = "%c";
        size_t len;
 
-       if (!localtime_r (&time, &t)) return NULL;
+       if (time == 0 || !localtime_r (&time, &t)) return NULL;
 
        len = strftime (s, sizeof (s), fmt_hack, &t);
        if (len == 0 || s[0] == '\0') return NULL;