From: Patrick Plitzner Date: Tue, 15 Dec 2015 07:29:53 +0000 (+0100) Subject: Fix possible NPE X-Git-Tag: 4.0.0^2~212 X-Git-Url: https://dev.e-taxonomy.eu/gitweb/taxeditor.git/commitdiff_plain/c5a2968473bc74d6f623cdf55613278dc4ef87a8 Fix possible NPE --- diff --git a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerContextMenu.java b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerContextMenu.java index 59082ad86..db59d464d 100644 --- a/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerContextMenu.java +++ b/eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/view/CdmViewerContextMenu.java @@ -108,7 +108,12 @@ public class CdmViewerContextMenu extends CompoundContributionItem { } ParameterizedCommand parameterizedCommand = ParameterizedCommand.generateCommand(command, params); try { - handlerService.executeCommand(parameterizedCommand, null); + if(parameterizedCommand!=null){ + handlerService.executeCommand(parameterizedCommand, null); + } + else{ + handlerService.executeCommand(command.getId(), null); + } } catch (NotDefinedException nde) { throw new RuntimeException("Could not find open command: " + command.getId()); } catch (Exception exception) {