reduced danger that Tray does not initialize

pull/533/head
Michael Peter Christen 2 years ago
parent 61b27217b9
commit 6042dd99c6

@ -108,7 +108,7 @@ public final class Tray {
} else { } else {
System.setProperty("java.awt.headless", "true"); System.setProperty("java.awt.headless", "true");
} }
} catch (final Exception e) { } catch (final Throwable e) {
System.setProperty("java.awt.headless", "true"); System.setProperty("java.awt.headless", "true");
} }
} }
@ -167,7 +167,7 @@ public final class Tray {
} }
} }
private static void setDockIcon(Image icon) { private static void setDockIcon(final Image icon) {
if (!OS.isMacArchitecture || setDockIconImage == null || applicationInstance == null) return; if (!OS.isMacArchitecture || setDockIconImage == null || applicationInstance == null) return;
try { try {
setDockIconImage.invoke(applicationInstance, icon); setDockIconImage.invoke(applicationInstance, icon);

Loading…
Cancel
Save