提交 f09a9768 编写于 作者: M mbaesken

8232381: add result NULL-checking to freetypeScaler.c

8231129: More glyph images
Reviewed-by: clanger, prr
上级 d7fe734b
...@@ -675,10 +675,14 @@ Java_sun_font_FreetypeFontScaler_getGlyphMetricsNative( ...@@ -675,10 +675,14 @@ Java_sun_font_FreetypeFontScaler_getGlyphMetricsNative(
pScalerContext, pScaler, glyphCode); pScalerContext, pScaler, glyphCode);
info = (GlyphInfo*) jlong_to_ptr(image); info = (GlyphInfo*) jlong_to_ptr(image);
(*env)->SetFloatField(env, metrics, sunFontIDs.xFID, info->advanceX); if (info != NULL) {
(*env)->SetFloatField(env, metrics, sunFontIDs.yFID, info->advanceY); (*env)->SetFloatField(env, metrics, sunFontIDs.xFID, info->advanceX);
(*env)->SetFloatField(env, metrics, sunFontIDs.yFID, info->advanceY);
free(info); free(info);
} else {
(*env)->SetFloatField(env, metrics, sunFontIDs.xFID, 0.0f);
(*env)->SetFloatField(env, metrics, sunFontIDs.yFID, 0.0f);
}
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册