check to see if entity is null before loading by hibernate
authorCherian Mathew <c.mathew@bgbm.org>
Tue, 23 Jul 2013 15:26:24 +0000 (15:26 +0000)
committerCherian Mathew <c.mathew@bgbm.org>
Tue, 23 Jul 2013 15:26:24 +0000 (15:26 +0000)
eu.etaxonomy.taxeditor.bulkeditor/src/main/java/eu/etaxonomy/taxeditor/annotatedlineeditor/AnnotatedLineEditor.java

index fef97c5d67759b05d7980faf2374054072ff74df..90653125629cf16939dc2d07deb0a7de5837a20a 100644 (file)
@@ -160,7 +160,7 @@ public class AnnotatedLineEditor extends TextEditor implements IConversationEnab
                // we need to bind back this editors conversation
                // we also need to reload the entity because the conversation used to
                // to create / save the entity may have been closed
-               if(((AnnotatedLineDocumentProvider) getDocumentProvider()).getEntityCreator(getEditorInput()).savesEntity()) {          
+               if(entity != null && ((AnnotatedLineDocumentProvider) getDocumentProvider()).getEntityCreator(getEditorInput()).savesEntity()) {                
                        getConversationHolder().bind();
                        Object object = CdmStore.getService(IOccurrenceService.class).load(((CdmBase)entity).getUuid());                        
                        entity = HibernateProxyHelper.deproxy(object);