diff options
author | Robin Watts <robin.watts@artifex.com> | 2017-11-07 18:27:56 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-11-08 00:07:39 +0000 |
commit | e664cdb39b3b1d55fd143239ec5d58f28bec3008 (patch) | |
tree | 9871b5783a1bcdfb5f9ed7e4f6437b08395c45f1 /source/pdf | |
parent | 7ce7d1ae75f68d8bdf708af08428a4002b2df85f (diff) | |
download | mupdf-e664cdb39b3b1d55fd143239ec5d58f28bec3008.tar.xz |
Bug 698689: Don't create a hint stream for a file with 0 pages.
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-write.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/pdf-write.c b/source/pdf/pdf-write.c index b97a9956..c9f70b0a 100644 --- a/source/pdf/pdf-write.c +++ b/source/pdf/pdf-write.c @@ -2952,7 +2952,7 @@ do_pdf_save_document(fz_context *ctx, pdf_document *doc, pdf_write_state *opts, } } - if (opts->do_linear) + if (opts->do_linear && opts->page_count > 0) { opts->main_xref_offset = fz_tell_output(ctx, opts->out); writexref(ctx, doc, opts, 0, opts->start, 0, 0, opts->first_xref_offset); |