fix NPE in factual data view
authorKatja Luther <k.luther@bgbm.org>
Sat, 2 Feb 2019 11:02:59 +0000 (12:02 +0100)
committerKatja Luther <k.luther@bgbm.org>
Sat, 2 Feb 2019 11:02:59 +0000 (12:02 +0100)
eu.etaxonomy.taxeditor.editor/src/main/java/eu/etaxonomy/taxeditor/editor/view/descriptive/e4/FactualDataPartE4.java

index 200c851925732839394791064c6ee96280168597..9072f7f5851b1e20d2db375b78e3abbd49cba96f 100644 (file)
@@ -213,11 +213,13 @@ public class FactualDataPartE4 extends AbstractCdmEditorPartE4
         if(refresh){
             List<? extends CdmBase> rootEntities = getRootEntities();
             for (CdmBase cdmBase : rootEntities) {
-                if(cdmBase.isInstanceOf(Taxon.class)){
-                    Taxon taxon = HibernateProxyHelper.deproxy(cdmBase, Taxon.class);
-                    Set<TaxonDescription> descriptions = taxon.getDescriptions();
-                    for (TaxonDescription taxonDescription : descriptions) {
-                        taxonDescription.setTitleCache(null, false);
+                if (cdmBase != null){
+                    if(cdmBase.isInstanceOf(Taxon.class)){
+                        Taxon taxon = HibernateProxyHelper.deproxy(cdmBase, Taxon.class);
+                        Set<TaxonDescription> descriptions = taxon.getDescriptions();
+                        for (TaxonDescription taxonDescription : descriptions) {
+                            taxonDescription.setTitleCache(null, false);
+                        }
                     }
                 }
             }