Fix NullPointerException for null TrayIcon

This commit is contained in:
Johannes Wolf 2025-12-19 15:53:03 +01:00
parent 3343f93723
commit 76d23e8354

View file

@ -79,13 +79,15 @@ public enum MageTray {
} catch (AWTException e) { } catch (AWTException e) {
log.error("TrayIcon could not be added: ", e); log.error("TrayIcon could not be added: ", e);
} }
} catch (Exception e) { } catch (Exception e) {
log.error(e); log.error(e);
} }
} }
public synchronized void blink() { public synchronized void blink() {
if (trayIcon == null)
return;
if (state == 0) { if (state == 0) {
synchronized (MageTray.class) { synchronized (MageTray.class) {
if (state == 0) { if (state == 0) {