summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2012-08-06 11:19:26 +0200
committerSebastian Rasmussen <sebras@gmail.com>2012-08-06 14:06:18 +0200
commit5c4eb97b3e89c22278e33480d929e2b2de29fe4d (patch)
tree496af9ef708d4c8f4c7783973cf36ea0f0d7997a
parente3e89a4b73a956ffb74d7a49d80f2d58235b7292 (diff)
downloadmupdf-5c4eb97b3e89c22278e33480d929e2b2de29fe4d.tar.xz
Free old stroke state when initing graphics state from another state
Thanks to Zeniko for pointing out this fix.
-rw-r--r--pdf/pdf_interpret.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/pdf/pdf_interpret.c b/pdf/pdf_interpret.c
index 8c1e40e6..ad4a6cac 100644
--- a/pdf/pdf_interpret.c
+++ b/pdf/pdf_interpret.c
@@ -929,6 +929,8 @@ copy_state(fz_context *ctx, pdf_gstate *gs, pdf_gstate *old)
gs->fill = old->fill;
gs->font = old->font;
gs->softmask = old->softmask;
+
+ fz_drop_stroke_state(ctx, gs->stroke_state);
gs->stroke_state = fz_keep_stroke_state(ctx, old->stroke_state);
pdf_keep_material(ctx, &gs->stroke);