From 69119eb64485e5451c6ec8a640b6488f225084c7 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 21 Jun 2009 20:49:34 +0000 Subject: sync to 1.7.19: do not try to print_body() when there is none --- usr.bin/mandoc/man_term.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'usr.bin/mandoc/man_term.c') diff --git a/usr.bin/mandoc/man_term.c b/usr.bin/mandoc/man_term.c index 4aede7a7120..20fa0c9531f 100644 --- a/usr.bin/mandoc/man_term.c +++ b/usr.bin/mandoc/man_term.c @@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.6 2009/06/18 23:34:53 schwarze Exp $ */ +/* $Id: man_term.c,v 1.7 2009/06/21 20:49:33 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -91,7 +91,10 @@ man_run(struct termp *p, const struct man *m) print_head(p, man_meta(m)); p->flags |= TERMP_NOSPACE; - print_body(p, man_node(m), man_meta(m)); + assert(man_node(m)); + assert(MAN_ROOT == man_node(m)->type); + if (man_node(m)->child) + print_body(p, man_node(m)->child, man_meta(m)); print_foot(p, man_meta(m)); return(1); -- cgit v1.2.3