From coverity: editor pane font can be null
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2234 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
bf686bb9ef
commit
9c48dd351f
|
@ -72,7 +72,8 @@ public class AboutFrame extends JFrame {
|
||||||
jEditorPane = new JEditorPane();
|
jEditorPane = new JEditorPane();
|
||||||
HTMLEditorKit htmlEditorKit = new HTMLEditorKit();
|
HTMLEditorKit htmlEditorKit = new HTMLEditorKit();
|
||||||
StyleSheet stylesheet = htmlEditorKit.getStyleSheet();
|
StyleSheet stylesheet = htmlEditorKit.getStyleSheet();
|
||||||
stylesheet.addRule("body { font-size:small;font-family: " + jEditorPane.getFont().getFamily() + '}');
|
Font font = jEditorPane.getFont();
|
||||||
|
stylesheet.addRule("body { font-size:small;font-family: " + ((font==null)?"Arial":font.getFamily()) + '}');
|
||||||
jEditorPane.setEditorKit(htmlEditorKit);
|
jEditorPane.setEditorKit(htmlEditorKit);
|
||||||
jEditorPane.setContentType("text/html");
|
jEditorPane.setContentType("text/html");
|
||||||
jEditorPane.setText(getContent(null));
|
jEditorPane.setText(getContent(null));
|
||||||
|
|
Loading…
Reference in New Issue