Project

General

Profile

« Previous | Next » 

Revision ae2b6b1b

Added by Cherian Mathew over 8 years ago

Add check to make sure active session is not null

View differences:

eu.etaxonomy.taxeditor.cdmlib/src/main/java/eu/etaxonomy/taxeditor/session/DefaultNewEntityListener.java
32 32
    public void onCreate(CdmBase cdmBase) {
33 33
        logger.info("New Entity created : " + cdmBase);
34 34
        if(CdmApplicationState.getCurrentAppConfig() instanceof CdmApplicationRemoteController){
35
            ((CdmApplicationRemoteController)CdmApplicationState.getCurrentAppConfig()).getCdmEntitySessionManager().getActiveSession().addNewCdmEntity(cdmBase);
35
            ICdmEntitySession activeSession = ((CdmApplicationRemoteController)CdmApplicationState.getCurrentAppConfig()).getCdmEntitySessionManager().getActiveSession();
36
            if(activeSession != null) {
37
                activeSession.addNewCdmEntity(cdmBase);
38
            }
36 39
        }
37 40
    }
38 41

  

Also available in: Unified diff