8073334: Improved font substitutions
authorprr
Mon, 06 Apr 2015 15:54:29 -0700
changeset 31696 9130242e6cfb
parent 31695 4d10942c9a7b
child 31697 3b1fe217d0b0
8073334: Improved font substitutions Reviewed-by: srl, bae, mschoene
jdk/src/java.desktop/share/native/libfontmanager/layout/AlternateSubstSubtables.cpp
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/AlternateSubstSubtables.cpp	Mon Apr 06 20:24:27 2015 +0000
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/AlternateSubstSubtables.cpp	Mon Apr 06 15:54:29 2015 -0700
@@ -53,6 +53,7 @@
             Offset alternateSetTableOffset = SWAPW(alternateSetTableOffsetArray[coverageIndex]);
             const LEReferenceTo<AlternateSetTable> alternateSetTable(base, success,
                                   (const AlternateSetTable *) ((char *) this + alternateSetTableOffset));
+            if (!LE_SUCCESS(success)) return 0;
             TTGlyphID alternate = SWAPW(alternateSetTable->alternateArray[0]);
 
             if (filter == NULL || filter->accept(LE_SET_GLYPH(glyph, alternate), success)) {