fix NPE
authorKatja Luther <k.luther@bgbm.org>
Tue, 3 Jan 2023 10:02:33 +0000 (11:02 +0100)
committerKatja Luther <k.luther@bgbm.org>
Tue, 3 Jan 2023 10:02:33 +0000 (11:02 +0100)
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/ui/section/reference/OriginalSourceElement.java [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index d98a23f..b985f62
@@ -114,10 +114,10 @@ public class OriginalSourceElement<T extends OriginalSourceBase>
         if (eventSource.equals(selection_Ref)){
 
             getEntity().setCitation(selection_Ref.getEntity());
-            ReferenceType newRefType = getEntity().getCitation().getType();
-            if (refType != null && refType.isDynamic() ^ getEntity().getCitation().getType().isDynamic()) {
+         
+            ReferenceType newRefType = getEntity().getCitation() != null? getEntity().getCitation().getType(): null;
+            if (refType != null && refType.isDynamic()^(newRefType!= null && newRefType.isDynamic()) ){
                this.refresh();
-//             this.getParentElement().refresh();
             }
             refType = newRefType;
         }else if (eventSource.equals(microReference)){