mirror of
https://github.com/moparisthebest/davmail
synced 2025-01-05 18:58:02 -05:00
From coverity: check null after ImageIO.read
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@2233 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
193932f921
commit
bf686bb9ef
@ -58,8 +58,10 @@ public class AboutFrame extends JFrame {
|
||||
ClassLoader classloader = this.getClass().getClassLoader();
|
||||
URL imageUrl = classloader.getResource("tray32.png");
|
||||
Image iconImage = ImageIO.read(imageUrl);
|
||||
ImageIcon icon = new ImageIcon(iconImage);
|
||||
imageLabel.setIcon(icon);
|
||||
if (iconImage != null) {
|
||||
ImageIcon icon = new ImageIcon(iconImage);
|
||||
imageLabel.setIcon(icon);
|
||||
}
|
||||
JPanel imagePanel = new JPanel();
|
||||
imagePanel.add(imageLabel);
|
||||
add(BorderLayout.WEST, imagePanel);
|
||||
|
Loading…
Reference in New Issue
Block a user