diff --git a/activemq-core/src/main/java/org/activemq/broker/AbstractConnection.java b/activemq-core/src/main/java/org/activemq/broker/AbstractConnection.java index e42e60d93a..b80bbafef4 100755 --- a/activemq-core/src/main/java/org/activemq/broker/AbstractConnection.java +++ b/activemq-core/src/main/java/org/activemq/broker/AbstractConnection.java @@ -111,7 +111,9 @@ public abstract class AbstractConnection implements Service, Connection, Task, C this.connector = connector; this.broker = broker; - this.statistics.setParent(connector.getStatistics()); + if (connector != null) { + this.statistics.setParent(connector.getStatistics()); + } if( taskRunnerFactory != null ) { taskRunner = taskRunnerFactory.createTaskRunner( this );