From 1000326aaaeab4ae17a8f93ef6d28e287fb120cc Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 29 Aug 2016 15:24:14 +0200 Subject: Don't try to copy a NULL dictionary. --- source/pdf/pdf-xref.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') 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]; -- cgit v1.2.3