From: handa Date: Wed, 25 Feb 2009 06:41:29 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: REL-0-9-9~13 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=ff27541f7be2baf4103a676f254c2a97a6a0b4a0;p=m17n%2Flibotf.git *** empty log message *** --- diff --git a/example/otfview.c b/example/otfview.c index 919c8f3..b89de38 100644 --- a/example/otfview.c +++ b/example/otfview.c @@ -1558,13 +1558,18 @@ main (int argc, char **argv) || 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) {