I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Unverified Commit a66422fa authored by zzz's avatar zzz
Browse files

Console: Catch error checking systray availability (gitlab issue !331)

parent dabc29f8
No related branches found
No related tags found
No related merge requests found
...@@ -203,8 +203,14 @@ public class ConfigServiceHandler extends FormHandler { ...@@ -203,8 +203,14 @@ public class ConfigServiceHandler extends FormHandler {
* @since 0.9.26 * @since 0.9.26
*/ */
public boolean shouldShowSystray() { public boolean shouldShowSystray() {
return SystemTray.isSupported() && try {
!SystemVersion.isService() && if (!SystemTray.isSupported())
return false;
} catch (Throwable t) {
// java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
return false;
}
return !SystemVersion.isService() &&
!(SystemVersion.isWindows() && _context.hasWrapper() && WrapperManager.isLaunchedAsService()); !(SystemVersion.isWindows() && _context.hasWrapper() && WrapperManager.isLaunchedAsService());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment