提交 ad26d97a 编写于 作者: P prr

7068471: NPE in sun.font.FontConfigManager.getFontConfigFont() when...

7068471: NPE in sun.font.FontConfigManager.getFontConfigFont() when libfontconfig.so is not installed
Reviewed-by: jgodinez, prr
Contributed-by: spoole@linux.vnet.ibm.com
上级 82d12eca
......@@ -347,6 +347,11 @@ public class FontConfigManager {
name = name.toLowerCase();
initFontConfigFonts(false);
if (fontConfigFonts == null) {
// This avoids an immediate NPE if fontconfig look up failed
// but doesn't guarantee this is a recoverable situation.
return null;
}
FcCompFont fcInfo = null;
for (int i=0; i<fontConfigFonts.length; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册