diff options
-rw-r--r-- | mupdf/pdf_interpret.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/mupdf/pdf_interpret.c b/mupdf/pdf_interpret.c index ca7e8053..b58d47e9 100644 --- a/mupdf/pdf_interpret.c +++ b/mupdf/pdf_interpret.c @@ -124,6 +124,8 @@ grestore(pdf_csi *csi) pdf_dropmaterial(&gs->stroke); pdf_dropmaterial(&gs->fill); + if (gs->font) + pdf_dropfont(gs->font); csi->gtop --; @@ -140,6 +142,8 @@ pdf_dropcsi(pdf_csi *csi) fz_dropcolorspace(csi->gstate[csi->gtop].fill.cs); if (csi->gstate[csi->gtop].stroke.cs) fz_dropcolorspace(csi->gstate[csi->gtop].stroke.cs); + if (csi->gstate[csi->gtop].font) + pdf_dropfont(csi->gstate[csi->gtop].font); if (csi->tree) fz_droptree(csi->tree); |