forked from Qortal/qortal
Prevent multiple system tray icons
Added "synchronized" to SysTray.getInstance. Also log launching of system tray icon.
This commit is contained in:
parent
964e0a02ca
commit
b038e10ee7
@ -39,6 +39,8 @@ public class SysTray {
|
||||
if (!SystemTray.isSupported())
|
||||
return;
|
||||
|
||||
LOGGER.info("Launching system tray icon");
|
||||
|
||||
this.popupMenu = createJPopupMenu();
|
||||
|
||||
// Build TrayIcon without AWT PopupMenu (which doesn't support Unicode)...
|
||||
@ -170,7 +172,7 @@ public class SysTray {
|
||||
}
|
||||
}
|
||||
|
||||
public static SysTray getInstance() {
|
||||
public static synchronized SysTray getInstance() {
|
||||
if (instance == null)
|
||||
instance = new SysTray();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user