summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--read.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/read.c b/read.c
index 8c1da44a..ab2a7347 100644
--- a/read.c
+++ b/read.c
@@ -1,4 +1,4 @@
-/* $Id: read.c,v 1.24 2011/10/06 22:29:12 kristaps Exp $ */
+/* $Id: read.c,v 1.25 2011/10/08 15:42:29 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2011 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;