8074330: Set font anchors more solidly
authorvadim
Tue, 07 Apr 2015 13:37:30 +0300
changeset 31698 9dbc80b20ac6
parent 31697 3b1fe217d0b0
child 31699 7bc1eec6ce3b
8074330: Set font anchors more solidly Reviewed-by: prr, srl, mschoene
jdk/src/java.desktop/share/native/libfontmanager/layout/MarkToBasePosnSubtables.cpp
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/MarkToBasePosnSubtables.cpp	Tue Apr 07 13:37:30 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/MarkToBasePosnSubtables.cpp	Tue Apr 07 13:37:30 2015 +0300
@@ -97,13 +97,9 @@
 
     if( LE_FAILURE(success) ) { return 0; }
     Offset anchorTableOffset = SWAPW(baseRecord->baseAnchorTableOffsetArray[markClass]);
-    if (anchorTableOffset <= 0) {
-        // this means the table is mal-formed...
-        glyphIterator->setCurrGlyphBaseOffset(baseIterator.getCurrStreamPosition());
-        return 0;
-    }
+    LEReferenceTo<AnchorTable> anchorTable(baseArray, success, anchorTableOffset);
+    if( LE_FAILURE(success) ) { return 0; }
 
-    LEReferenceTo<AnchorTable> anchorTable(baseArray, success, anchorTableOffset);
     LEPoint baseAnchor, markAdvance, pixels;