avoid NPE
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / section / name / NonViralNameDetailElement.java
index 6f43c1e238edefe0b54a9e0fe700038ab988e06b..e16d6e253a2fec5ab290fe1ac1a66e5fe2d2a1c6 100644 (file)
@@ -171,9 +171,15 @@ public class NonViralNameDetailElement
                                this.updateContent();
                    //this is needed for the "new" wizards in order to redraw correctly
                    StoreUtil.reflowParentScrolledForm(getLayoutComposite(), true);
-                               section_hybrid.setEntity(getEntity());
-                               section_author.setEntity(getEntity());
-                               section_name.setEntity(getEntity());
+                   if (section_hybrid != null){
+                       section_hybrid.setEntity(getEntity());
+                   }
+                   if (section_author != null){
+                       section_author.setEntity(getEntity());
+                   }
+                   if (section_name != null){
+                       section_name.setEntity(getEntity());
+                   }
                        }else{
                                combo_nomenclaturalCode.setSelection(getEntity().getNameType());
                        }