diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2016-12-18 17:18:08 +0100 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-12-19 11:13:19 +0100 |
commit | 131da04f4c660feba409117f19613bf97cbdb437 (patch) | |
tree | 7f9371c915ef22a0973c3f7605c4c9312dc2ad12 /source/pdf | |
parent | 5671be276d2fcd7db5622e7dda8f07cc245e0db5 (diff) | |
download | mupdf-131da04f4c660feba409117f19613bf97cbdb437.tar.xz |
Make pdf_trailer() return NULL if there is no xref.
Diffstat (limited to 'source/pdf')
-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 43fd3ea4..6db54472 100644 --- a/source/pdf/pdf-xref.c +++ b/source/pdf/pdf-xref.c @@ -139,7 +139,7 @@ pdf_obj *pdf_trailer(fz_context *ctx, pdf_document *doc) /* Return the document's final trailer */ pdf_xref *xref = &doc->xref_sections[0]; - return xref->trailer; + return xref ? xref->trailer : NULL; } void pdf_set_populating_xref_trailer(fz_context *ctx, pdf_document *doc, pdf_obj *trailer) |