|| strstr (filename, ".OTF"))
{
otf = OTF_open_ft_face (face);
- if (! otf
- || OTF_get_table (otf, "head") < 0
- || OTF_get_table (otf, "cmap") < 0
- || (OTF_check_table (otf, "GSUB") < 0
- && OTF_check_table (otf, "GPOS") < 0))
- otf = NULL;
- else
+ if (otf)
+ {
+ if (OTF_get_table (otf, "head") < 0
+ || OTF_get_table (otf, "cmap") < 0
+ || (OTF_check_table (otf, "GSUB") < 0
+ && OTF_check_table (otf, "GPOS") < 0))
+ {
+ OTF_close (otf);
+ otf = NULL;
+ }
+ }
+ if (otf)
for (i = 0; i < otf->cmap->numTables; i++)
if (otf->cmap->EncodingRecord[i].subtable.format == 14)
{