From 78cf41711a0bd26a4bcba054a54007df0f5b5bb2 Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 27 Feb 2021 06:28:16 +0000 Subject: [PATCH] Handle NULL term_type. --- usr.bin/tmux/format.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 5980c5d61d2..1b971064088 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.279 2021/02/26 21:53:41 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.280 2021/02/27 06:28:16 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott @@ -1368,8 +1368,11 @@ format_cb_client_termname(struct format_tree *ft) static void * format_cb_client_termtype(struct format_tree *ft) { - if (ft->c != NULL) + if (ft->c != NULL) { + if (ft->c->term_type == NULL) + return (xstrdup("")); return (xstrdup(ft->c->term_type)); + } return (NULL); } -- 2.20.1