From: Jonas Fonseca Date: Tue, 17 Nov 2009 04:10:54 +0000 (-0500) Subject: Fix draw_date to not format anything when time arg is NULL X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1cb715dd72650568a45b63f69dc9470304d5d35c;p=tig.git Fix draw_date to not format anything when time arg is NULL --- diff --git a/tig.c b/tig.c index a442024..084fc0f 100644 --- a/tig.c +++ b/tig.c @@ -2149,7 +2149,7 @@ draw_field(struct view *view, enum line_type type, const char *text, int len, bo static bool draw_date(struct view *view, time_t *time) { - const char *date = mkdate(time); + const char *date = time ? mkdate(time) : ""; int cols = opt_date == DATE_SHORT ? DATE_SHORT_COLS : DATE_COLS; return draw_field(view, LINE_DATE, date, cols, FALSE);