From 40ad11b2b5155dbccf15881500f2b4f8b16d509d Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 27 Feb 2021 06:28:16 +0000 Subject: [PATCH] Handle NULL term_type. --- format.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/format.c b/format.c index 46af036c..c8550907 100644 --- a/format.c +++ b/format.c @@ -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); }