diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-02-27 06:28:17 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-02-27 06:28:17 +0000 |
commit | 5ccfbf5694ee29f71fd7c5dee27c24c9d32567e2 (patch) | |
tree | 0d8db1a8d1f477f2734804670eafcb8420a136b3 /usr.bin/tmux/format.c | |
parent | 1efb962366f02d792081e5eee1fcba25f5634190 (diff) |
Handle NULL term_type.
Diffstat (limited to 'usr.bin/tmux/format.c')
-rw-r--r-- | usr.bin/tmux/format.c | 7 |
1 files 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 <nicholas.marriott@gmail.com> @@ -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); } |