diff options
-rw-r--r-- | source/pdf/pdf-xref.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/pdf-xref.c b/source/pdf/pdf-xref.c index aaa79bf3..01a584e3 100644 --- a/source/pdf/pdf-xref.c +++ b/source/pdf/pdf-xref.c @@ -98,7 +98,7 @@ int pdf_xref_len(pdf_document *doc) /* Return the length of the document's final xref section */ pdf_xref *xref = &doc->xref_sections[0]; - return xref->len; + return xref == NULL ? 0 : xref->len; } /* Used while reading the individual xref sections from a file */ |