jdk/src/share/native/sun/font/layout/LookupProcessor.cpp
changeset 16889 3df90f344221
parent 15967 688298c47675
child 16890 36b30720a997
--- a/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp	Mon Mar 18 18:15:59 2013 -0700
+++ b/jdk/src/share/native/sun/font/layout/LookupProcessor.cpp	Fri Feb 15 13:07:17 2013 -0800
@@ -25,7 +25,7 @@
 
 /*
  *
- * (C) Copyright IBM Corp. 1998-2010 - All Rights Reserved
+ * (C) Copyright IBM Corp. 1998-2013 - All Rights Reserved
  *
  */
 
@@ -95,10 +95,9 @@
 
         if (selectMask != 0) {
             const LookupTable *lookupTable = lookupListTable->getLookupTable(lookup);
-
-            if (!lookupTable)
+            if (!lookupTable) {
                 continue;
-
+            }
             le_uint16 lookupFlags = SWAPW(lookupTable->lookupFlags);
 
             glyphIterator.reset(lookupFlags, selectMask);
@@ -143,9 +142,9 @@
 
     for (le_uint16 lookup = 0; lookup < lookupCount; lookup += 1) {
         le_uint16 lookupListIndex = SWAPW(featureTable->lookupListIndexArray[lookup]);
-
-        if (lookupListIndex >= lookupSelectCount)
+        if (lookupListIndex >= lookupSelectCount) {
             continue;
+        }
 
         lookupSelectArray[lookupListIndex] |= featureMask;
         lookupOrderArray[store++] = lookupListIndex;
@@ -224,11 +223,15 @@
         le_uint16 featureIndex = SWAPW(langSysTable->featureIndexArray[feature]);
 
         featureTable = featureListTable->getFeatureTable(featureIndex, &featureTag);
+        if (!featureTable) {
+             continue;
+        }
+        featureReferences += SWAPW(featureTable->lookupCount);
+    }
 
-        if (!featureTable)
-            continue;
-
-        featureReferences += SWAPW(featureTable->lookupCount);
+    if (!featureTable) {
+        success = LE_INTERNAL_ERROR;
+        return;
     }
 
     if (requiredFeatureIndex != 0xFFFF) {