- fixed possible NPE
authorPatric Plitzner <p.plitzner@bgbm.org>
Thu, 26 Feb 2015 12:58:46 +0000 (12:58 +0000)
committerPatric Plitzner <p.plitzner@bgbm.org>
Thu, 26 Feb 2015 12:58:46 +0000 (12:58 +0000)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/contextMenu/CreateDerivateContextMenu.java

index 782bd413df3a2f0326e2b4eec294ad38348ec9bb..b04582f5e453ad17148e2868bbd88099a3846f0d 100644 (file)
@@ -99,7 +99,7 @@ public class CreateDerivateContextMenu extends CompoundContributionItem {
     }
 
     private void createMenuItem(Menu menu, String menuLabel, final TreeNode selectedNode, Class<?> childClass, final SpecimenOrObservationType specimenType, final DerivationEventType derivationEventType) {
-        if(specimenType.equals(SpecimenOrObservationType.Media)){
+        if(specimenType!=null && specimenType.equals(SpecimenOrObservationType.Media)){
             //media submenu
             MenuItem mediaItem = new MenuItem(menu, SWT.CASCADE);
             mediaItem.setText("Media...");