From c648955c79231d750dc43a0514f3612b41e35294 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Mon, 5 Sep 2016 15:51:31 +0100 Subject: Mutool clean: Avoid "Not a dict ()" error If there are no outlines, don't throw an error trying to strip them. --- source/pdf/pdf-clean-file.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source') 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; -- cgit v1.2.3