summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/dvipdfm-x/cidtype0.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/Build/source/texk/dvipdfm-x/cidtype0.c b/Build/source/texk/dvipdfm-x/cidtype0.c
index 9749a1fff2a..f7e6b441a40 100644
--- a/Build/source/texk/dvipdfm-x/cidtype0.c
+++ b/Build/source/texk/dvipdfm-x/cidtype0.c
@@ -749,7 +749,10 @@ CIDFont_type0_open (CIDFont *font, const char *name,
if ((sfont->type != SFNT_TYPE_TTC && sfont->type != SFNT_TYPE_POSTSCRIPT) ||
sfnt_read_table_directory(sfont, offset) < 0 ||
(offset = sfnt_find_table_pos(sfont, "CFF ")) == 0) {
- ERROR("Not a CFF/OpenType font (4)?");
+ sfnt_close(sfont);
+ if (fp)
+ DPXFCLOSE(fp);
+ return -1;
}
cffont = cff_open(sfont->stream, offset, opt->index);
@@ -1181,7 +1184,10 @@ CIDFont_type0_t1copen (CIDFont *font, const char *name,
if ((sfont->type != SFNT_TYPE_TTC && sfont->type != SFNT_TYPE_POSTSCRIPT) ||
sfnt_read_table_directory(sfont, offset) < 0 ||
(offset = sfnt_find_table_pos(sfont, "CFF ")) == 0) {
- ERROR("Not a CFF/OpenType font (8)?");
+ sfnt_close(sfont);
+ if (fp)
+ DPXFCLOSE(fp);
+ return -1;
}
cffont = cff_open(fp, offset, opt->index);