summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/man_term.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@cvs.openbsd.org>2009-06-21 20:49:34 +0000
committerIngo Schwarze <schwarze@cvs.openbsd.org>2009-06-21 20:49:34 +0000
commit69119eb64485e5451c6ec8a640b6488f225084c7 (patch)
tree1c6ddbf043f1855701506ab36795f486ac122e7d /usr.bin/mandoc/man_term.c
parent29d2930c5a2e4d7978e5f4d10916d781fe22af1f (diff)
sync to 1.7.19: do not try to print_body() when there is none
Diffstat (limited to 'usr.bin/mandoc/man_term.c')
-rw-r--r--usr.bin/mandoc/man_term.c7
1 files changed, 5 insertions, 2 deletions
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 <kristaps@kth.se>
*
@@ -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);