summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-clean-file.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-04-29 12:19:29 +0100
committerRobin Watts <robin.watts@artifex.com>2016-04-29 12:20:16 +0100
commit81b2f10edce3a25257bcd947e5cfe549d82b6f09 (patch)
tree9945523fff8affc60e94e22a24fdff547cd03c2c /source/pdf/pdf-clean-file.c
parent722dfa0e30d9cbaf8c467edc32a916f653c2132c (diff)
downloadmupdf-81b2f10edce3a25257bcd947e5cfe549d82b6f09.tar.xz
muclean: Avoid warning when no Outlines present in document.
Diffstat (limited to 'source/pdf/pdf-clean-file.c')
-rw-r--r--source/pdf/pdf-clean-file.c3
1 files changed, 2 insertions, 1 deletions
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);