]> www.fi.muni.cz Git - evince.git/commitdiff
Check if date is invalid. Fix for bug 318134.
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Tue, 11 Oct 2005 21:09:09 +0000 (21:09 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Tue, 11 Oct 2005 21:09:09 +0000 (21:09 +0000)
* properties/ev-properties-view.c:
(ev_properties_view_format_date):

Check if date is invalid. Fix for bug 318134.

ChangeLog
properties/ev-properties-view.c

index a9f699ba13d8a3a4afd76d1280f94403010957bb..7a8d1356388a201398bd713533162782775247de 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-10-12  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
+
+       * properties/ev-properties-view.c:
+       (ev_properties_view_format_date):
+       
+       Check if date is invalid. Fix for bug 318134.
+
 2005-10-02  Wouter Bolsterlee <uws+gnome@xs4all.nl>
 
        * shell/ev-window-title.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;