changeset 11602:de91f05824c5 jdk8u75-b04

8146498: Better device table adjustments Reviewed-by: vadim, mschoene
author prr
date Wed, 13 Jan 2016 11:28:09 -0800
parents 9cfd1afc506f
children 0fdc333ccf86
files src/share/native/sun/font/layout/DeviceTables.cpp
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/font/layout/DeviceTables.cpp	Fri Jan 15 11:49:36 2016 +0300
+++ b/src/share/native/sun/font/layout/DeviceTables.cpp	Wed Jan 13 11:28:09 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;