Fix potential NPE
authorPatrick Plitzner <p.plitzner@bgbm.org>
Fri, 4 May 2018 14:30:21 +0000 (16:30 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Fri, 4 May 2018 14:30:21 +0000 (16:30 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/name/operation/CreateNewTaxonBaseOperation.java

index 65f1c97bbdec285db3559ca0ca6e1c145a443668..eb65e700ae33422745843fc436fed9f3651243b4 100755 (executable)
@@ -55,11 +55,9 @@ public abstract class CreateNewTaxonBaseOperation extends AbstractPostTaxonOpera
         Object activePart = EditorUtil.getActivePart();
         if (activePart instanceof TaxonNameEditorE4){
            editor = (TaxonNameEditorE4) activePart;
-
+           editor.getEditorInput().addToSaveNew(newTaxonBase);
+           editor.setDirty();
         }
-        editor.getEditorInput().addToSaveNew(newTaxonBase);
-        editor.setDirty();
-
     }
 
 }