8034119: [parfait] JNI exception pending in jdk/src/macosx/native/sun/font/CCharToGlyphMapper.m

Reviewed-by: serb, jgodinez
This commit is contained in:
Phil Race 2014-03-18 11:31:11 -07:00
parent 21e9bfc83e
commit 2beb211aef

View File

@ -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);
}