mirror of
https://github.com/Qortal/qortal.git
synced 2025-07-22 20:26:50 +00:00
Prevent multiple system tray icons
Added "synchronized" to SysTray.getInstance. Also log launching of system tray icon.
This commit is contained in:
@@ -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();
|
||||
|
||||
|
Reference in New Issue
Block a user