diff --git a/hibernate-envers/src/main/java/org/hibernate/envers/event/spi/EnversIntegrator.java b/hibernate-envers/src/main/java/org/hibernate/envers/event/spi/EnversIntegrator.java index c3206abebe..1bbbeaa39d 100644 --- a/hibernate-envers/src/main/java/org/hibernate/envers/event/spi/EnversIntegrator.java +++ b/hibernate-envers/src/main/java/org/hibernate/envers/event/spi/EnversIntegrator.java @@ -113,7 +113,9 @@ public class EnversIntegrator implements Integrator { @Override public void disintegrate(SessionFactoryImplementor sessionFactory, SessionFactoryServiceRegistry serviceRegistry) { - enversConfiguration.destroy(); + if ( enversConfiguration != null ) { + enversConfiguration.destroy(); + } } /**