summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--read.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/read.c b/read.c
index 29ee4682..d97c944b 100644
--- a/read.c
+++ b/read.c
@@ -464,7 +464,8 @@ rerun:
* buffer because we're going to descend into
* the file recursively.
*/
- curp->secondary->sz -= pos + 1;
+ if (curp->secondary)
+ curp->secondary->sz -= pos + 1;
mparse_readfd_r(curp, -1, ln.buf + of, 1);
if (MANDOCLEVEL_FATAL <= curp->file_status)
break;