summaryrefslogtreecommitdiffstats
path: root/mdoc_html.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index eda5ce41..6987525c 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -501,7 +501,8 @@ mdoc_sh_pre(MDOC_ARGS)
case ROFFT_HEAD:
id = html_make_id(n);
print_otag(h, TAG_H1, "cTi", "Sh", id);
- print_otag(h, TAG_A, "chR", "selflink", id);
+ if (id != NULL)
+ print_otag(h, TAG_A, "chR", "selflink", id);
free(id);
break;
case ROFFT_BODY:
@@ -524,7 +525,8 @@ mdoc_ss_pre(MDOC_ARGS)
id = html_make_id(n);
print_otag(h, TAG_H2, "cTi", "Ss", id);
- print_otag(h, TAG_A, "chR", "selflink", id);
+ if (id != NULL)
+ print_otag(h, TAG_A, "chR", "selflink", id);
free(id);
return 1;
}