summaryrefslogtreecommitdiffstats
path: root/format.c
diff options
context:
space:
mode:
authornicm <nicm>2021-10-05 12:45:02 +0000
committernicm <nicm>2021-10-05 12:45:02 +0000
commit3d5a02bf45f03f9dc37b2178ac7964f3f2b3748c (patch)
tree39e709071c2a14da8e9cada72dcbe88e1b188c49 /format.c
parent68c890585991c1114690d43a179eef0a7f207871 (diff)
Do not try to use NULL time values.
Diffstat (limited to 'format.c')
-rw-r--r--format.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/format.c b/format.c
index 8202a256..55b40ec0 100644
--- a/format.c
+++ b/format.c
@@ -3327,7 +3327,7 @@ format_find(struct format_tree *ft, const char *key, int modifiers,
fte = format_table_get(key);
if (fte != NULL) {
value = fte->cb(ft);
- if (fte->type == FORMAT_TABLE_TIME)
+ if (fte->type == FORMAT_TABLE_TIME && value != NULL)
t = ((struct timeval *)value)->tv_sec;
else
found = value;