diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-10-05 12:45:03 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-10-05 12:45:03 +0000 |
commit | bf601a228801867438455ee8aeccc151ac13ce68 (patch) | |
tree | 2fa5f33deb868b2bdd741c9987502570c6242ad0 /usr.bin/tmux/format.c | |
parent | dcc5670814adfc45ef943ca20caa730ff62f9ebe (diff) |
Do not try to use NULL time values.
Diffstat (limited to 'usr.bin/tmux/format.c')
-rw-r--r-- | usr.bin/tmux/format.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 59d047a2172..74ed8b09779 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.294 2021/08/20 20:08:30 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.295 2021/10/05 12:45:02 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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; |