From: nicm Date: Sat, 27 Feb 2021 06:28:16 +0000 (+0000) Subject: Handle NULL term_type. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=78cf41711a0bd26a4bcba054a54007df0f5b5bb2;p=openbsd Handle NULL term_type. --- 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); }