=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.277 retrieving revision 1.278 diff -u -p -r1.277 -r1.278 --- mandoc/mdoc_html.c 2017/03/15 11:29:53 1.277 +++ mandoc/mdoc_html.c 2017/03/17 12:10:16 1.278 @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.277 2017/03/15 11:29:53 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.278 2017/03/17 12:10:16 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2016, 2017 Ingo Schwarze @@ -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; }