From 81b2f10edce3a25257bcd947e5cfe549d82b6f09 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 29 Apr 2016 12:19:29 +0100 Subject: muclean: Avoid warning when no Outlines present in document. --- source/pdf/pdf-clean-file.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/pdf/pdf-clean-file.c') diff --git a/source/pdf/pdf-clean-file.c b/source/pdf/pdf-clean-file.c index 05f5a7fc..e4e4a435 100644 --- a/source/pdf/pdf-clean-file.c +++ b/source/pdf/pdf-clean-file.c @@ -189,7 +189,8 @@ static void retainpages(fz_context *ctx, globals *glo, int argc, char **argv) root = pdf_new_dict(ctx, doc, 3); pdf_dict_put(ctx, root, PDF_NAME_Type, pdf_dict_get(ctx, oldroot, PDF_NAME_Type)); pdf_dict_put(ctx, root, PDF_NAME_Pages, pdf_dict_get(ctx, oldroot, PDF_NAME_Pages)); - pdf_dict_put(ctx, root, PDF_NAME_Outlines, outlines); + if (outlines) + pdf_dict_put(ctx, root, PDF_NAME_Outlines, outlines); pdf_update_object(ctx, doc, pdf_to_num(ctx, oldroot), root); -- cgit v1.2.3