jdk/src/java.desktop/share/native/libfontmanager/layout/Features.cpp
changeset 35299 d5737dedc6df
parent 35290 e50a5c5c6a47
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/Features.cpp	Tue Dec 15 12:59:00 2015 +0000
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/Features.cpp	Tue Dec 22 09:50:09 2015 +0300
@@ -43,9 +43,10 @@
     LEReferenceToArrayOf<FeatureRecord>
         featureRecordArrayRef(base, success, featureRecordArray, SWAPW(featureCount));
 
-  if (featureIndex >= SWAPW(featureCount) || LE_FAILURE(success)) {
-    return LEReferenceTo<FeatureTable>();
-  }
+    if (featureIndex >= SWAPW(featureCount) || LE_FAILURE(success)) {
+        success = LE_INDEX_OUT_OF_BOUNDS_ERROR;
+        return LEReferenceTo<FeatureTable>();
+    }
 
     Offset featureTableOffset = featureRecordArray[featureIndex].featureTableOffset;