-/* $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>
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);
}