mirror of
https://github.com/apache/activemq.git
synced 2025-02-09 19:45:55 +00:00
[AMQ-8395] Avoid possible NPE when sending advisory message
(cherry picked from commit f74992c1058eb8de051c1ce0779ba4f34ba39ed3)
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…
x
Reference in New Issue
Block a user