Handle NULL term_type.

pull/2599/head
nicm 2021-02-27 06:28:16 +00:00
parent 583aaebc0a
commit 40ad11b2b5
1 changed files with 4 additions and 1 deletions

View File

@ -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);
}