Fix potential NPE #5513
authorPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 30 Mar 2016 12:47:19 +0000 (14:47 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Wed, 30 Mar 2016 12:47:19 +0000 (14:47 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/derivate/handler/OpenDerivativeEditorForDescriptionElement.java

index 7e3b08b7a242bdb126387c64eadc159a5c8ce1e7..698d7938b41114a5a3c34b28f7fe24ef38c44683 100644 (file)
@@ -22,7 +22,7 @@ public class OpenDerivativeEditorForDescriptionElement extends DefaultOpenHandle
     @Override
     protected IndividualsAssociation getEntity(UUID uuid) {
         DescriptionElementBase descriptionElement = CdmStore.getService(IDescriptionService.class).loadDescriptionElement(uuid, null);
-        if(descriptionElement.isInstanceOf(IndividualsAssociation.class)){
+        if(descriptionElement!=null && descriptionElement.isInstanceOf(IndividualsAssociation.class)){
             return (IndividualsAssociation) descriptionElement;
         }
         return null;