Author: robbinspg
Date: Wed Oct  4 06:36:08 2006
New Revision: 452883

URL: http://svn.apache.org/viewvc?view=rev&rev=452883
Log:
TUSCANY-719 Correct use of iterators

Modified:
    incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.cpp

Modified: 
incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.cpp
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.cpp?view=diff&rev=452883&r1=452882&r2=452883
==============================================================================
--- incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.cpp 
(original)
+++ incubator/tuscany/cpp/sdo/runtime/core/src/commonj/sdo/DataObjectImpl.cpp 
Wed Oct  4 06:36:08 2006
@@ -3603,14 +3603,16 @@
          PropertyValueMap::iterator i = PropertyValues.begin();
         while (i != PropertyValues.end()) 
         {
-            unset((*i).first);
-            if (i == PropertyValues.begin())
+            unsigned int pindx = (*i).first;
+            unset(pindx);
+            i = PropertyValues.begin();
+            if (i != PropertyValues.end() && (*i).first == pindx)
             {
                 // unset has not removed the item from the list - do it 
                 // here instead
                 PropertyValues.erase(i);
+                i = PropertyValues.begin();
             }
-            i = PropertyValues.begin();
         }
 
         // Theory: A DO cant get here if its still attached to anything,



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to