mirror of https://github.com/apache/activemq.git
[AMQ-8395] Avoid possible NPE when sending advisory message
(cherry picked from commit f74992c105
)
This commit is contained in:
parent
0476091fee
commit
57b1316d21
|
@ -540,7 +540,7 @@ public class Topic extends BaseDestination implements Task {
|
|||
|
||||
message.incrementReferenceCount();
|
||||
|
||||
if (context.isInTransaction()) {
|
||||
if (context.isInTransaction() && (context.getTransaction() != null)) {
|
||||
context.getTransaction().addSynchronization(new Synchronization() {
|
||||
@Override
|
||||
public void afterCommit() throws Exception {
|
||||
|
|
Loading…
Reference in New Issue