diff options
author | Paul Gardiner <paulg.artifex@glidos.net> | 2013-07-03 14:23:06 +0100 |
---|---|---|
committer | Paul Gardiner <paulg.artifex@glidos.net> | 2013-07-03 14:23:06 +0100 |
commit | b3f197164385a58214ba150fb33b23227bae6712 (patch) | |
tree | 2091035b43fdd1ac91e76d029b0f38711a5fa031 /source/pdf/pdf-annot.c | |
parent | 607474c1ea7c1e4fc4a5ac220236afb72dba8c21 (diff) | |
download | mupdf-b3f197164385a58214ba150fb33b23227bae6712.tar.xz |
Avoid spurious, broken-annotation warning when appearance stream missing
Diffstat (limited to 'source/pdf/pdf-annot.c')
-rw-r--r-- | source/pdf/pdf-annot.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/pdf/pdf-annot.c b/source/pdf/pdf-annot.c index 9c93ac93..cbe2d201 100644 --- a/source/pdf/pdf-annot.c +++ b/source/pdf/pdf-annot.c @@ -541,7 +541,7 @@ pdf_load_annots(pdf_document *doc, pdf_obj *annots, pdf_page *page) is_dict = pdf_is_dict(ap); if (!is_dict) - fz_throw(ctx, FZ_ERROR_GENERIC, "Annotation object not a dictionary"); + fz_throw(ctx, FZ_ERROR_NO_APPEARANCE_STREAM, "Annotation has no appearance stream"); if (hp->num == pdf_to_num(obj) && hp->gen == pdf_to_gen(obj) @@ -583,7 +583,8 @@ pdf_load_annots(pdf_document *doc, pdf_obj *annots, pdf_page *page) *itr = annot->next; annot->next = NULL; /* Required because pdf_free_annot follows the "next" chain */ pdf_free_annot(ctx, annot); - fz_warn(ctx, "ignoring broken annotation"); + if (fz_caught(ctx) != FZ_ERROR_NO_APPEARANCE_STREAM) + fz_warn(ctx, "ignoring broken annotation"); /* FIXME: TryLater */ } } |