summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2012-08-04 16:34:11 +0200
committerSebastian Rasmussen <sebras@gmail.com>2012-08-06 13:54:18 +0200
commit16628b1419a260874f92b71263cc179c419f33b6 (patch)
tree8db17ea178525c102fed78fefeb7b687918bd98d
parentf919270b6a732ff45c3ba2d0c105e2b39e9c9bc9 (diff)
downloadmupdf-16628b1419a260874f92b71263cc179c419f33b6.tar.xz
Only warn once about ignoring rendering errors
-rw-r--r--pdf/pdf_interpret.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/pdf/pdf_interpret.c b/pdf/pdf_interpret.c
index ab55ee66..efc007e4 100644
--- a/pdf/pdf_interpret.c
+++ b/pdf/pdf_interpret.c
@@ -2540,6 +2540,7 @@ pdf_run_stream(pdf_csi *csi, pdf_obj *rdb, fz_stream *file, pdf_lexbuf *buf)
fz_context *ctx = csi->dev->ctx;
int tok = PDF_TOK_ERROR;
int in_array;
+ int ignoring_errors = 0;
/* make sure we have a clean slate if we come here from flush_text */
pdf_clear_stack(csi);
@@ -2680,7 +2681,11 @@ pdf_run_stream(pdf_csi *csi, pdf_obj *rdb, fz_stream *file, pdf_lexbuf *buf)
/* Swallow the error */
if (csi->cookie)
csi->cookie->errors++;
- fz_warn(ctx, "Ignoring error during rendering");
+ if (!ignoring_errors)
+ {
+ fz_warn(ctx, "Ignoring errors during rendering");
+ ignoring_errors = 1;
+ }
/* If we do catch an error, then reset ourselves to a
* base lexing state */
in_array = 0;