summaryrefslogtreecommitdiff
path: root/pdf/pdf_font3.c
diff options
context:
space:
mode:
Diffstat (limited to 'pdf/pdf_font3.c')
-rw-r--r--pdf/pdf_font3.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pdf/pdf_font3.c b/pdf/pdf_font3.c
index fd8619ee4..9cb3d2885 100644
--- a/pdf/pdf_font3.c
+++ b/pdf/pdf_font3.c
@@ -110,9 +110,11 @@ pdfi_type3_build_char(gs_show_enum * penum, gs_gstate * pgs, gs_font * pfont,
/* Use the utility routine above to copy the fill colour to the stroke colour */
pdfi_type3_copy_color(&OBJ_CTX(font)->pgs->color[0], &OBJ_CTX(font)->pgs->color[1]);
- pdfi_gsave(OBJ_CTX(font));
- pdfi_run_context(OBJ_CTX(font), CharProc, font->PDF_font, true, "CharProc");
- pdfi_grestore(OBJ_CTX(font));
+ code = pdfi_gsave(OBJ_CTX(font));
+ if (code >= 0) {
+ code = pdfi_run_context(OBJ_CTX(font), CharProc, font->PDF_font, true, "CharProc");
+ (void)pdfi_grestore(OBJ_CTX(font));
+ }
/* Use the utility routine above to copy the temporary copy to the stroke colour */
pdfi_type3_copy_color(&tmp_color, &OBJ_CTX(font)->pgs->color[1]);