diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2016-08-29 15:24:14 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2016-08-30 16:55:25 +0200 |
commit | 1000326aaaeab4ae17a8f93ef6d28e287fb120cc (patch) | |
tree | 8bb2075136e402cf52a3471d9160079485b7ea7a /source/pdf/pdf-xref.c | |
parent | 594968c50e697475f05c37a2f48432d72daed262 (diff) | |
download | mupdf-1000326aaaeab4ae17a8f93ef6d28e287fb120cc.tar.xz |
Don't try to copy a NULL dictionary.
Diffstat (limited to 'source/pdf/pdf-xref.c')
-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 32225998..c5b37127 100644 --- a/source/pdf/pdf-xref.c +++ b/source/pdf/pdf-xref.c @@ -332,7 +332,7 @@ static void ensure_incremental_xref(fz_context *ctx, pdf_document *doc) fz_try(ctx) { sub = fz_malloc_struct(ctx, pdf_xref_subsec); - trailer = pdf_copy_dict(ctx, xref->trailer); + trailer = xref->trailer ? pdf_copy_dict(ctx, xref->trailer) : NULL; doc->xref_sections = fz_resize_array(ctx, doc->xref_sections, doc->num_xref_sections + 1, sizeof(pdf_xref)); xref = &doc->xref_sections[0]; pxref = &doc->xref_sections[1]; |