From e2d9d5d4111a2478d95550439be6ad5d3ba41293 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Tue, 5 Apr 2011 13:12:34 +0000 Subject: Fix type- and NULL-check to be correct node (last, not child). Prevents segfault in NetBSD. --- mandoc-db.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mandoc-db.c') diff --git a/mandoc-db.c b/mandoc-db.c index 6fb32435..9396dd0e 100644 --- a/mandoc-db.c +++ b/mandoc-db.c @@ -1,4 +1,4 @@ -/* $Id: mandoc-db.c,v 1.6 2011/04/05 13:09:33 kristaps Exp $ */ +/* $Id: mandoc-db.c,v 1.7 2011/04/05 13:12:34 kristaps Exp $ */ /* * Copyright (c) 2011 Kristaps Dzonsons * @@ -546,7 +546,7 @@ pmdoc_Vt(MDOC_ARGS) return; if (MDOC_Vt == n->tok && MDOC_BODY != n->type) return; - if (NULL == n->child || MDOC_TEXT != n->child->type) + if (NULL == n->last || MDOC_TEXT != n->last->type) return; /* -- cgit v1.2.3-56-ge451