diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-09-05 15:51:31 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-09-05 15:52:23 +0100 |
commit | c648955c79231d750dc43a0514f3612b41e35294 (patch) | |
tree | 7b0e4a0f071bec960ba63596740588eb652f83e9 | |
parent | 796be86b078c59bed0d67c4322072317a9fafb06 (diff) | |
download | mupdf-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.
-rw-r--r-- | source/pdf/pdf-clean-file.c | 3 |
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; |