8146498: Better device table adjustments
authorprr
Wed, 13 Jan 2016 11:23:25 -0800
changeset 37581 d02c078c2db2
parent 37580 46b10ab97043
child 37582 1be93e82e442
8146498: Better device table adjustments Reviewed-by: vadim, mschoene
jdk/src/java.desktop/share/native/libfontmanager/layout/DeviceTables.cpp
--- a/jdk/src/java.desktop/share/native/libfontmanager/layout/DeviceTables.cpp	Wed Dec 23 02:31:34 2015 +0000
+++ b/jdk/src/java.desktop/share/native/libfontmanager/layout/DeviceTables.cpp	Wed Jan 13 11:23:25 2016 -0800
@@ -45,9 +45,12 @@
 
 le_int16 DeviceTable::getAdjustment(const LEReferenceTo<DeviceTable>&base, le_uint16 ppem, LEErrorCode &success) const
 {
+    le_int16 result = 0;
+    if (LE_FAILURE(success)) {
+        return result;
+    }
     le_uint16 start = SWAPW(startSize);
     le_uint16 format = SWAPW(deltaFormat) - 1;
-    le_int16 result = 0;
 
     if (ppem >= start && ppem <= SWAPW(endSize) && format < FORMAT_COUNT) {
         le_uint16 sizeIndex = ppem - start;