summaryrefslogtreecommitdiffstats
path: root/read.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-04-03 10:05:37 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-04-03 10:05:37 +0000
commit30823ed848f6fdfe70dedc3207ffad3e075dc51a (patch)
treea3a06a380381d763d757bd566cef61d9d9728b07 /read.c
parent7b602cf91c4da49b12d6eea1b45ac5fdfec6d095 (diff)
downloadmandoc-30823ed848f6fdfe70dedc3207ffad3e075dc51a.tar.gz
Allow mparse_result() pointers to be NULL.
Diffstat (limited to 'read.c')
-rw-r--r--read.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/read.c b/read.c
index bc7d2071..ac0b23be 100644
--- a/read.c
+++ b/read.c
@@ -709,8 +709,10 @@ void
mparse_result(struct mparse *curp, struct mdoc **mdoc, struct man **man)
{
- *mdoc = curp->mdoc;
- *man = curp->man;
+ if (mdoc)
+ *mdoc = curp->mdoc;
+ if (man)
+ *man = curp->man;
}
void