From 16628b1419a260874f92b71263cc179c419f33b6 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Sat, 4 Aug 2012 16:34:11 +0200 Subject: Only warn once about ignoring rendering errors --- pdf/pdf_interpret.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3