(main): If ! otf, don't setup sub14.
authorhanda <handa>
Wed, 25 Feb 2009 04:38:52 +0000 (04:38 +0000)
committerhanda <handa>
Wed, 25 Feb 2009 04:38:52 +0000 (04:38 +0000)
example/otfview.c

index 3700d9e..919c8f3 100644 (file)
@@ -1564,12 +1564,13 @@ main (int argc, char **argv)
          || (OTF_check_table (otf, "GSUB") < 0
              && OTF_check_table (otf, "GPOS") < 0))
        otf = NULL;
-      for (i = 0; i < otf->cmap->numTables; i++)
-       if (otf->cmap->EncodingRecord[i].subtable.format == 14)
-         {
-           sub14 = otf->cmap->EncodingRecord[i].subtable.f.f14;
-           break;
-         }
+      else
+       for (i = 0; i < otf->cmap->numTables; i++)
+         if (otf->cmap->EncodingRecord[i].subtable.format == 14)
+           {
+             sub14 = otf->cmap->EncodingRecord[i].subtable.f.f14;
+             break;
+           }
     }
 
   {