summaryrefslogtreecommitdiffstats
path: root/validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'validate.c')
-rw-r--r--validate.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/validate.c b/validate.c
index dbe41e4f..9f9d5cde 100644
--- a/validate.c
+++ b/validate.c
@@ -306,7 +306,8 @@ pre_display(struct mdoc *mdoc, struct mdoc_node *node)
if (MDOC_BLOCK != node->type)
return(1);
- for (n = mdoc->last; n; n = n->parent)
+ assert(mdoc->last);
+ for (n = mdoc->last->parent; n; n = n->parent)
if (MDOC_BLOCK == n->type)
if (MDOC_Bd == n->tok)
break;