changeset 9448:94096aaa86cb

8034119: [parfait] JNI exception pending in jdk/src/macosx/native/sun/font/CCharToGlyphMapper.m Reviewed-by: jgodinez, serb
author prr
date Mon, 31 Mar 2014 16:03:53 -0700
parents 7ab172b1ddbc
children a2ef778afcbb
files src/macosx/native/sun/font/CCharToGlyphMapper.m
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/macosx/native/sun/font/CCharToGlyphMapper.m	Mon Mar 31 16:03:51 2014 -0700
+++ b/src/macosx/native/sun/font/CCharToGlyphMapper.m	Mon Mar 31 16:03:53 2014 -0700
@@ -101,10 +101,13 @@
     jchar *unicodesAsChars =
         (*env)->GetPrimitiveArrayCritical(env, unicodes, NULL);
 
-    AllocateGlyphBuffer(env, awtFont, count, (UniChar *)unicodesAsChars, glyphs);
+    if (unicodesAsChars != NULL) {
+        AllocateGlyphBuffer(env, awtFont, count,
+                           (UniChar *)unicodesAsChars, glyphs);
 
     (*env)->ReleasePrimitiveArrayCritical(env, unicodes,
                                           unicodesAsChars, JNI_ABORT);
+    }
 
 JNF_COCOA_EXIT(env);
 }