8034119: [parfait] JNI exception pending in jdk/src/macosx/native/sun/font/CCharToGlyphMapper.m
Reviewed-by: serb, jgodinez
--- a/jdk/src/macosx/native/sun/font/CCharToGlyphMapper.m Tue Mar 18 18:11:41 2014 +0400
+++ b/jdk/src/macosx/native/sun/font/CCharToGlyphMapper.m Tue Mar 18 11:31:11 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);
+ (*env)->ReleasePrimitiveArrayCritical(env, unicodes,
+ unicodesAsChars, JNI_ABORT);
+ }
JNF_COCOA_EXIT(env);
}