diff options
author | Johnny Willemsen <jwillemsen@remedy.nl> | 2012-11-20 19:33:16 +0000 |
---|---|---|
committer | Johnny Willemsen <jwillemsen@remedy.nl> | 2012-11-20 19:33:16 +0000 |
commit | 0e9b3d3947b77de3375165f3fc96ecaa0686713e (patch) | |
tree | 0ef5d9cf19c52d5404dbe552a62f2167328bce95 /TAO/tao/Utils | |
parent | 3511a85ab54e3efacad976862abf5cb61167ddc6 (diff) | |
download | ATCD-0e9b3d3947b77de3375165f3fc96ecaa0686713e.tar.gz |
Tue Nov 20 19:32:42 UTC 2012 Johnny Willemsen <jwillemsen@remedy.nl>
* tao/Utils/PolicyList_Destroyer.cpp:
Call index also in the try/catch scope because it can also
throw an exception
Diffstat (limited to 'TAO/tao/Utils')
-rw-r--r-- | TAO/tao/Utils/PolicyList_Destroyer.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/TAO/tao/Utils/PolicyList_Destroyer.cpp b/TAO/tao/Utils/PolicyList_Destroyer.cpp index adc8436e240..5e15e55e325 100644 --- a/TAO/tao/Utils/PolicyList_Destroyer.cpp +++ b/TAO/tao/Utils/PolicyList_Destroyer.cpp @@ -10,24 +10,20 @@ TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO::Utils::PolicyList_Destroyer::~PolicyList_Destroyer() throw () { - for (CORBA::ULong i = 0; i != length(); ++i) { CORBA::Policy_ptr policy = (*this)[i]; - if (CORBA::is_nil (policy)) - { - continue; - } - - try + if (!CORBA::is_nil (policy)) { - policy->destroy (); + try + { + policy->destroy (); + (*this)[i] = CORBA::Policy::_nil(); + } + catch (...) + { + } } - catch (...) - { - } - - (*this)[i] = CORBA::Policy::_nil(); } } |