From 2beb211aef34d484d763cddfb4445e478aff2ce4 Mon Sep 17 00:00:00 2001 From: Phil Race Date: Tue, 18 Mar 2014 11:31:11 -0700 Subject: [PATCH] 8034119: [parfait] JNI exception pending in jdk/src/macosx/native/sun/font/CCharToGlyphMapper.m Reviewed-by: serb, jgodinez --- jdk/src/macosx/native/sun/font/CCharToGlyphMapper.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/jdk/src/macosx/native/sun/font/CCharToGlyphMapper.m b/jdk/src/macosx/native/sun/font/CCharToGlyphMapper.m index cf081379120..d2e12cfc70c 100644 --- a/jdk/src/macosx/native/sun/font/CCharToGlyphMapper.m +++ b/jdk/src/macosx/native/sun/font/CCharToGlyphMapper.m @@ -101,10 +101,13 @@ JNF_COCOA_ENTER(env); 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); }