X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=date.c;fp=date.c;h=3f337c962247f71c37ae217bc3fd18be959bbd5d;hp=7fdbb7101cf4d447ec649f225ef512cbc5c84af8;hb=401c6cc5793331773c0230e8ae00e8c4b0c63a5e;hpb=8e4e0559e74262c3e24f832e5cf729287be205c7 diff --git a/date.c b/date.c index 7fdbb710..3f337c96 100644 --- a/date.c +++ b/date.c @@ -643,12 +643,15 @@ notmuch_parse_date (const char *str, int *tz_offset) { date_token *token, *tokens; time_t date; - + + if (str == NULL) + return 0; + if (!(tokens = datetok (str))) { if (tz_offset) *tz_offset = 0; - return (time_t) 0; + return 0; } if (!(date = parse_rfc822_date (tokens, tz_offset)))