From 51972e3be60ebdf7105fd12deb5756deb66fe5f0 Mon Sep 17 00:00:00 2001 From: nicm Date: Tue, 5 Oct 2021 12:45:02 +0000 Subject: [PATCH] Do not try to use NULL time values. --- usr.bin/tmux/format.c | 4 ++-- 1 file 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 @@ -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; -- 2.20.1