summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/broker/QueuePolicy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/qpid/broker/QueuePolicy.cpp')
-rw-r--r--cpp/src/qpid/broker/QueuePolicy.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/cpp/src/qpid/broker/QueuePolicy.cpp b/cpp/src/qpid/broker/QueuePolicy.cpp
index aefb87a392..c967823ecc 100644
--- a/cpp/src/qpid/broker/QueuePolicy.cpp
+++ b/cpp/src/qpid/broker/QueuePolicy.cpp
@@ -48,12 +48,16 @@ bool QueuePolicy::checkLimit(const QueuedMessage& m)
if (exceeded) {
if (!policyExceeded) {
policyExceeded = true;
- QPID_LOG(info, "Queue size exceeded policy for " << m.queue->getName());
+ if (m.queue) {
+ QPID_LOG(info, "Queue size exceeded policy for " << m.queue->getName());
+ }
}
} else {
if (policyExceeded) {
policyExceeded = false;
- QPID_LOG(info, "Queue size within policy for " << m.queue->getName());
+ if (m.queue) {
+ QPID_LOG(info, "Queue size within policy for " << m.queue->getName());
+ }
}
}
return !exceeded;