From 80e3cf38ac1541e1f2033b16b47a5a91b34cff4a Mon Sep 17 00:00:00 2001 From: tkellner Date: Wed, 12 Mar 2014 16:36:52 +0000 Subject: Catch null trayicon event (double click) git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1309 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../src/main/java/at/gv/egiz/bku/webstart/gui/MOCCAIcon.java | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'BKUWebStart/src/main/java') diff --git a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/MOCCAIcon.java b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/MOCCAIcon.java index eaf2bee5..1b9996fc 100644 --- a/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/MOCCAIcon.java +++ b/BKUWebStart/src/main/java/at/gv/egiz/bku/webstart/gui/MOCCAIcon.java @@ -229,6 +229,11 @@ public class MOCCAIcon implements StatusNotifier, ActionListener, ItemListener { */ @Override public void actionPerformed(ActionEvent e) { + if ((e == null) || (e.getActionCommand() == null)) { + log.debug("tray menu command is null"); + return; + } + switch (COMMANDS.valueOf(e.getActionCommand())) { case SHUTDOWN_COMMAND: log.debug("shutdown requested via tray menu"); @@ -262,12 +267,12 @@ public class MOCCAIcon implements StatusNotifier, ActionListener, ItemListener { log.debug("get-certificate dialog requested via tray menu"); controller.getCertificate(messages.getLocale()); break; - + case HARDWAREINFO_COMMAND: log.debug("hardware-info dialog requested via tray menu"); controller.hardwareInfo(messages.getLocale()); break; - + case HELP_COMMAND: log.debug("help page requested via tray menu"); controller.showHelp(messages.getLocale()); @@ -277,7 +282,7 @@ public class MOCCAIcon implements StatusNotifier, ActionListener, ItemListener { log.debug("identity link dialog requested via tray menu"); controller.getIdentityLink(messages.getLocale()); break; - + default: log.error("unknown tray menu command: " + e.getActionCommand()); } -- cgit v1.2.3