diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java index d35793b8ca..bf510764c7 100644 --- a/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/BrokerService.java @@ -454,7 +454,9 @@ public class BrokerService implements Service, Serializable { if (broker != null) { stopper.stop(broker); } - tempDataStore.close(); + if(tempDataStore!=null){ + tempDataStore.close(); + } if (isUseJmx()) { MBeanServer mbeanServer = getManagementContext().getMBeanServer();