summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Stitcher <astitcher@apache.org>2009-08-07 03:14:20 +0000
committerAndrew Stitcher <astitcher@apache.org>2009-08-07 03:14:20 +0000
commit86bdc0e60d67989074fc07f633dc371c2ae3f341 (patch)
treee6c1bec7b8ee70b211ff4abbcb3667f1a6a0a7cc
parentb6bda07c1abd67203bdb75b6eeb4d9b3784a22e5 (diff)
downloadqpid-python-86bdc0e60d67989074fc07f633dc371c2ae3f341.tar.gz
Fixed LinkRegistry destructor to only cancel TimerTask if there is one!
(the only time there might not be one is in the store tests) git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@801871 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/qpid/broker/LinkRegistry.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/qpid/cpp/src/qpid/broker/LinkRegistry.cpp b/qpid/cpp/src/qpid/broker/LinkRegistry.cpp
index 793ffd8d2e..f32587dd68 100644
--- a/qpid/cpp/src/qpid/broker/LinkRegistry.cpp
+++ b/qpid/cpp/src/qpid/broker/LinkRegistry.cpp
@@ -58,7 +58,9 @@ LinkRegistry::LinkRegistry (Broker* _broker) :
LinkRegistry::~LinkRegistry()
{
- maintenanceTask->cancel();
+ // This test is only necessary if the default constructor above is present
+ if (maintenanceTask)
+ maintenanceTask->cancel();
}
LinkRegistry::Periodic::Periodic (LinkRegistry& _links) :