=================================================================== RCS file: /cvs/mandoc/man_html.c,v retrieving revision 1.134 retrieving revision 1.135 diff -u -p -r1.134 -r1.135 --- mandoc/man_html.c 2017/03/15 11:29:53 1.134 +++ mandoc/man_html.c 2017/03/17 12:10:16 1.135 @@ -1,4 +1,4 @@ -/* $Id: man_html.c,v 1.134 2017/03/15 11:29:53 schwarze Exp $ */ +/* $Id: man_html.c,v 1.135 2017/03/17 12:10:16 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze @@ -440,7 +440,8 @@ man_SH_pre(MAN_ARGS) if (n->type == 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); } return 1; @@ -509,7 +510,8 @@ man_SS_pre(MAN_ARGS) if (n->type == ROFFT_HEAD) { 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;