From fd2ca50b85bd6aa2e2fe474dc1b9f6d5a6ffaa32 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Wed, 25 Mar 2015 17:38:41 +0000 Subject: Bug 695885: Avoid too many pop clips. When making a new pdf_run_processor to handle type 3 glyph contents, we can inherit the current gstate. Do NOT inherit the current clip depth, as otherwise we pop too many on exit. --- source/pdf/pdf-op-run.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/pdf/pdf-op-run.c b/source/pdf/pdf-op-run.c index e153dbd1..bec85959 100644 --- a/source/pdf/pdf-op-run.c +++ b/source/pdf/pdf-op-run.c @@ -2115,6 +2115,7 @@ pdf_new_run_processor(fz_context *ctx, fz_device *dev, const fz_matrix *ctm, con if (gstate) { pdf_copy_gstate(ctx, &proc->gstate[0], gstate); + proc->gstate[0].clip_depth = 0; proc->gstate[0].ctm = *ctm; } proc->gtop = 0; -- cgit v1.2.3