public void onCreate(CdmBase cdmBase) {
logger.info("New Entity created : " + cdmBase);
if(CdmApplicationState.getCurrentAppConfig() instanceof CdmApplicationRemoteController){
- ((CdmApplicationRemoteController)CdmApplicationState.getCurrentAppConfig()).getCdmEntitySessionManager().getActiveSession().addNewCdmEntity(cdmBase);
+ ICdmEntitySession activeSession = ((CdmApplicationRemoteController)CdmApplicationState.getCurrentAppConfig()).getCdmEntitySessionManager().getActiveSession();
+ if(activeSession != null) {
+ activeSession.addNewCdmEntity(cdmBase);
+ }
}
}