From ff27541f7be2baf4103a676f254c2a97a6a0b4a0 Mon Sep 17 00:00:00 2001 From: handa Date: Wed, 25 Feb 2009 06:41:29 +0000 Subject: [PATCH] *** empty log message *** --- example/otfview.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) 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) { -- 1.7.10.4