Fix potential NPE
[taxeditor.git] / eu.etaxonomy.taxeditor.store / src / main / java / eu / etaxonomy / taxeditor / ui / element / CdmFormFactory.java
index d47a1dc3b3af0b1995a2aa144e460d72440cae22..71eb7276dd80fdd515082f0cdc718d57b25a6240 100644 (file)
@@ -2833,7 +2833,7 @@ public class CdmFormFactory extends FormToolkit {
 
         //check for parent section when entity is null
         //this happens when AbstractUnboundEntityCollectionSection is used
-        if(entity==null){
+        if(element==null){
             if(parentElement instanceof ScopeSection || parentElement instanceof ScopeRestrictionSection){
                 element = new ScopeElement(this,
                         parentElement,