summaryrefslogtreecommitdiff
path: root/ACE/ace/WFMO_Reactor.inl
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2014-09-16 18:11:56 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2014-09-16 18:11:56 +0000
commit37b61d612f24c4015252996a58d040eb7843dd76 (patch)
tree8dc2eee3b6416764385bda5a4aa5c59ca0ddcb41 /ACE/ace/WFMO_Reactor.inl
parentbc97d492399217f00fbd94ad76f1f6d81433186b (diff)
downloadATCD-37b61d612f24c4015252996a58d040eb7843dd76.tar.gz
Tue Sep 16 18:11:58 UTC 2014 Johnny Willemsen <jwillemsen@remedy.nl>
* ace/Dev_Poll_Reactor.cpp: * ace/Reactor.h: * ace/Select_Reactor_T.cpp: * ace/WFMO_Reactor.inl: When using ACE_Event_Handler_var together with reference counting it is easy to pass the var.handler() to the cancel_timer() operation of the reactor to just cancel all timers at shutdown. But, when the application specific initialization fails which leads to the fact that the var contains a nullptr, this leads to a crash. Updated all cancel_timer operations to also check if a valid event handler pointer has been passed. If not, we just return 0 * tests/MT_Reactor_Timer_Test.cpp: Added test for use case mentioned above
Diffstat (limited to 'ACE/ace/WFMO_Reactor.inl')
-rw-r--r--ACE/ace/WFMO_Reactor.inl2
1 files changed, 1 insertions, 1 deletions
diff --git a/ACE/ace/WFMO_Reactor.inl b/ACE/ace/WFMO_Reactor.inl
index d2e8d56bdba..eb81e727a5f 100644
--- a/ACE/ace/WFMO_Reactor.inl
+++ b/ACE/ace/WFMO_Reactor.inl
@@ -499,7 +499,7 @@ ACE_WFMO_Reactor::cancel_timer (ACE_Event_Handler *handler,
int dont_call_handle_close)
{
ACE_TRACE ("ACE_WFMO_Reactor::cancel_timer");
- if (0 != this->timer_queue_)
+ if ((0 != this->timer_queue_) && (0 != handler))
return this->timer_queue_->cancel (handler, dont_call_handle_close);
return 0;
}