summaryrefslogtreecommitdiff
path: root/source/pdf
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-09-05 15:51:31 +0100
committerRobin Watts <robin.watts@artifex.com>2016-09-05 15:52:23 +0100
commitc648955c79231d750dc43a0514f3612b41e35294 (patch)
tree7b0e4a0f071bec960ba63596740588eb652f83e9 /source/pdf
parent796be86b078c59bed0d67c4322072317a9fafb06 (diff)
downloadmupdf-c648955c79231d750dc43a0514f3612b41e35294.tar.xz
Mutool clean: Avoid "Not a dict (<NULL>)" error
If there are no outlines, don't throw an error trying to strip them.
Diffstat (limited to 'source/pdf')
-rw-r--r--source/pdf/pdf-clean-file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/pdf/pdf-clean-file.c b/source/pdf/pdf-clean-file.c
index 15d55b10..8b8f96ba 100644
--- a/source/pdf/pdf-clean-file.c
+++ b/source/pdf/pdf-clean-file.c
@@ -146,6 +146,9 @@ static int strip_outlines(fz_context *ctx, pdf_document *doc, pdf_obj *outlines,
pdf_obj *first;
pdf_obj *last;
+ if (outlines == NULL)
+ return 0;
+
first = pdf_dict_get(ctx, outlines, PDF_NAME_First);
if (first == NULL)
nc = 0;