--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/AnchorTables.cpp Tue Apr 07 13:37:30 2015 +0300
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/AnchorTables.cpp Tue Apr 07 13:37:30 2015 +0300
@@ -44,21 +44,27 @@
case 1:
{
LEReferenceTo<Format1AnchorTable> f1(base, success);
- f1->getAnchor(f1, fontInstance, anchor, success);
+ if (LE_SUCCESS(success)) {
+ f1->getAnchor(f1, fontInstance, anchor, success);
+ }
break;
}
case 2:
{
LEReferenceTo<Format2AnchorTable> f2(base, success);
- f2->getAnchor(f2, glyphID, fontInstance, anchor, success);
+ if (LE_SUCCESS(success)) {
+ f2->getAnchor(f2, glyphID, fontInstance, anchor, success);
+ }
break;
}
case 3:
{
LEReferenceTo<Format3AnchorTable> f3(base, success);
- f3->getAnchor(f3, fontInstance, anchor, success);
+ if (LE_SUCCESS(success)) {
+ f3->getAnchor(f3, fontInstance, anchor, success);
+ }
break;
}
@@ -66,7 +72,9 @@
{
// unknown format: just use x, y coordinate, like format 1...
LEReferenceTo<Format1AnchorTable> f1(base, success);
- f1->getAnchor(f1, fontInstance, anchor, success);
+ if (LE_SUCCESS(success)) {
+ f1->getAnchor(f1, fontInstance, anchor, success);
+ }
break;
}
}
@@ -112,16 +120,18 @@
if (dtxOffset != 0) {
LEReferenceTo<DeviceTable> dt(base, success, dtxOffset);
- le_int16 adjx = dt->getAdjustment(dt, (le_int16) fontInstance->getXPixelsPerEm(), success);
-
- pixels.fX += adjx;
+ if (LE_SUCCESS(success)) {
+ le_int16 adjx = dt->getAdjustment(dt, (le_int16) fontInstance->getXPixelsPerEm(), success);
+ pixels.fX += adjx;
+ }
}
if (dtyOffset != 0) {
LEReferenceTo<DeviceTable> dt(base, success, dtyOffset);
- le_int16 adjy = dt->getAdjustment(dt, (le_int16) fontInstance->getYPixelsPerEm(), success);
-
- pixels.fY += adjy;
+ if (LE_SUCCESS(success)) {
+ le_int16 adjy = dt->getAdjustment(dt, (le_int16) fontInstance->getYPixelsPerEm(), success);
+ pixels.fY += adjy;
+ }
}
fontInstance->pixelsToUnits(pixels, anchor);