summaryrefslogtreecommitdiffstats
path: root/man_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2019-01-11 16:36:19 +0000
committerIngo Schwarze <schwarze@openbsd.org>2019-01-11 16:36:19 +0000
commit3be1a948007b770862e4e6b4bd927cc241a0d209 (patch)
treebfcd7af16fe4cd6f691358fac9358fc136ea3671 /man_html.c
parent3b8011820928761c446895df4343ab1f0287aaf3 (diff)
downloadmandoc-3be1a948007b770862e4e6b4bd927cc241a0d209.tar.gz
do not access a NULL pointer when formatting a completely empty document
Diffstat (limited to 'man_html.c')
-rw-r--r--man_html.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/man_html.c b/man_html.c
index ce718a0e..d958d730 100644
--- a/man_html.c
+++ b/man_html.c
@@ -119,7 +119,7 @@ html_man(void *arg, const struct roff_meta *man)
if ((h->oflags & HTML_FRAGMENT) == 0) {
print_gen_decls(h);
print_otag(h, TAG_HTML, "");
- if (n->type == ROFFT_COMMENT)
+ if (n != NULL && n->type == ROFFT_COMMENT)
print_gen_comment(h, n);
t = print_otag(h, TAG_HEAD, "");
print_man_head(man, h);