summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-08-29 15:24:14 +0200
committerTor Andersson <tor.andersson@artifex.com>2016-08-30 16:55:25 +0200
commit1000326aaaeab4ae17a8f93ef6d28e287fb120cc (patch)
tree8bb2075136e402cf52a3471d9160079485b7ea7a /source
parent594968c50e697475f05c37a2f48432d72daed262 (diff)
downloadmupdf-1000326aaaeab4ae17a8f93ef6d28e287fb120cc.tar.xz
Don't try to copy a NULL dictionary.
Diffstat (limited to 'source')
-rw-r--r--source/pdf/pdf-xref.c2
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];