summaryrefslogtreecommitdiff
path: root/cpp/src
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
commit067cd381778e538c44ad5463d296e5523e1315f5 (patch)
tree00519cadbd213387759525fc02bb2dedd746d684 /cpp/src
parent776a1c00abbbceac0dadcd1e2bf7c7c942967853 (diff)
downloadqpid-python-067cd381778e538c44ad5463d296e5523e1315f5.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/qpid@801871 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/qpid/broker/LinkRegistry.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/cpp/src/qpid/broker/LinkRegistry.cpp b/cpp/src/qpid/broker/LinkRegistry.cpp
index 793ffd8d2e..f32587dd68 100644
--- a/cpp/src/qpid/broker/LinkRegistry.cpp
+++ b/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) :