Skip to content

Commit 9617840

Browse files
Handle icon failure better
1 parent 34fb14d commit 9617840

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/io/github/coursesplus/installer/CoursesPlusInstaller.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,14 @@ public CoursesPlusInstaller() {
5252

5353
screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
5454

55-
Application.getApplication().setDockIconImage(new ImageIcon(getClass().getResource("Logo.png")).getImage());
55+
try {
56+
Application.getApplication().setDockIconImage(new ImageIcon(getClass().getResource("Logo.png")).getImage());
57+
} catch (Exception e) {
58+
// icon isn't that important, continue
59+
// but log it
60+
logger.log(Level.WARNING, "Failed to load icon - " + e.getMessage(), e);
61+
}
5662

57-
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "CoursesPlus Installer");
58-
5963
try {
6064
// try and load Lato
6165
font = Font.createFont(Font.TRUETYPE_FONT, getClass().getResourceAsStream("Lato-Regular.ttf"));

0 commit comments

Comments
 (0)