summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2012-11-20 19:33:16 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2012-11-20 19:33:16 +0000
commite882fd65814508cf00b6f566349c989df506cca6 (patch)
tree0ef5d9cf19c52d5404dbe552a62f2167328bce95
parenta8bef734c4e5686c463994437353be58f509eb31 (diff)
downloadATCD-e882fd65814508cf00b6f566349c989df506cca6.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
-rw-r--r--TAO/ChangeLog6
-rw-r--r--TAO/tao/Utils/PolicyList_Destroyer.cpp22
2 files changed, 15 insertions, 13 deletions
diff --git a/TAO/ChangeLog b/TAO/ChangeLog
index 58c5f7aee98..ca1bd514ef0 100644
--- a/TAO/ChangeLog
+++ b/TAO/ChangeLog
@@ -1,3 +1,9 @@
+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
+
Tue Nov 20 13:39:00 UTC 2012 Simon Massey <Simon dot massey at prismtech dot com>
* TAO_IDL/be/be_util.cpp:
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();
}
}