Add null check to handler (#5283)
authorPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 5 Oct 2015 11:29:08 +0000 (13:29 +0200)
committerPatrick Plitzner <p.plitzner@bgbm.org>
Mon, 5 Oct 2015 11:29:08 +0000 (13:29 +0200)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/handler/MoveDescriptionElementsHandler.java

index 6ae90dc0479865b53921c32b5bfcb630dc06ec02..fb450935f7bbb1e057eef5fb21bbec7756c249c1 100644 (file)
@@ -88,7 +88,7 @@ public class MoveDescriptionElementsHandler extends AbstractHandler implements I
                        }
                        DescriptionBase description = elements.get(0).getInDescription();
                        List<UUID> excludeTaxa = new ArrayList<UUID>();
-                       if (description.isInstanceOf(TaxonDescription.class)){
+                       if (description!=null && description.isInstanceOf(TaxonDescription.class)){
                                TaxonDescription taxonDescription = HibernateProxyHelper.deproxy(description, TaxonDescription.class);
                                actualTaxon = taxonDescription.getTaxon();
                                excludeTaxa.add(actualTaxon.getUuid());