changeset 11745:1f347cee8bcc

8146498: Better device table adjustments Reviewed-by: vadim, mschoene
author prr
date Wed, 13 Jan 2016 11:28:09 -0800
parents 380267fd2bf4
children fec53330160b
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	Mon Jan 11 14:01:03 2016 -0800
+++ 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;