changeset 37581:d02c078c2db2

8146498: Better device table adjustments Reviewed-by: vadim, mschoene
author prr
date Wed, 13 Jan 2016 11:23:25 -0800
parents 46b10ab97043
children 1be93e82e442
files jdk/src/java.desktop/share/native/libfontmanager/layout/DeviceTables.cpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;