From 1f063e8557211e655c2eca8065623b157f590de5 Mon Sep 17 00:00:00 2001 From: Bosanac Dejan Date: Wed, 23 Jun 2010 14:23:51 +0000 Subject: [PATCH] https://issues.apache.org/activemq/browse/AMQ-2790 - check connection to prevent NPEs git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@957213 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/activemq/ActiveMQSessionExecutor.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java b/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java index 0c129d21ba..2fdca37499 100755 --- a/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java +++ b/activemq-core/src/main/java/org/apache/activemq/ActiveMQSessionExecutor.java @@ -45,7 +45,7 @@ public class ActiveMQSessionExecutor implements Task { ActiveMQSessionExecutor(ActiveMQSession session) { this.session = session; - if (this.session.connection.isMessagePrioritySupported()) { + if (this.session.connection != null && this.session.connection.isMessagePrioritySupported()) { this.messageQueue = new SimplePriorityMessageDispatchChannel(); }else { this.messageQueue = new FifoMessageDispatchChannel();