summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdoc_html.c3
-rw-r--r--mdoc_term.c5
-rw-r--r--mdoc_validate.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 8a3e26b8..1f18e3e2 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -756,6 +756,9 @@ mdoc_xr_pre(MDOC_ARGS)
struct htmlpair tag[2];
const struct mdoc_node *nn;
+ if (NULL == n->child)
+ return(0);
+
PAIR_CLASS_INIT(&tag[0], "link-man");
if (h->base_man) {
diff --git a/mdoc_term.c b/mdoc_term.c
index 81074b70..7e397362 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1277,7 +1277,10 @@ termp_xr_pre(DECL_ARGS)
{
const struct mdoc_node *nn;
- assert(n->child && MDOC_TEXT == n->child->type);
+ if (NULL == n->child)
+ return(0);
+
+ assert(MDOC_TEXT == n->child->type);
nn = n->child;
term_word(p, nn->string);
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 02b345ba..ef9fce61 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -133,7 +133,7 @@ static v_post posts_text1[] = { eerr_eq1, NULL };
static v_post posts_vt[] = { post_vt, NULL };
static v_post posts_wline[] = { bwarn_ge1, herr_eq0, NULL };
static v_post posts_wtext[] = { ewarn_ge1, NULL };
-static v_post posts_xr[] = { eerr_ge1, NULL };
+static v_post posts_xr[] = { ewarn_ge1, NULL };
static v_pre pres_an[] = { pre_an, NULL };
static v_pre pres_bd[] = { pre_display, pre_bd, NULL };
static v_pre pres_bl[] = { pre_bl, NULL };