From b53f13bc3058beab88ad98e78c0ce6c0ff5be2a0 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 14 Oct 2014 18:18:05 +0000 Subject: even if a table has zero columns, do not segfault in the formatter; bug reported by bentley@ --- tbl_term.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tbl_term.c') diff --git a/tbl_term.c b/tbl_term.c index 31dabe81..0ce60988 100644 --- a/tbl_term.c +++ b/tbl_term.c @@ -107,7 +107,7 @@ term_tbl(struct termp *tp, const struct tbl_span *sp) /* Vertical frame at the start of each row. */ if ((TBL_OPT_BOX | TBL_OPT_DBOX) & sp->opts->opts || - sp->head->vert) + (sp->head != NULL && sp->head->vert)) term_word(tp, TBL_SPAN_HORIZ == sp->pos || TBL_SPAN_DHORIZ == sp->pos ? "+" : "|"); -- cgit