Kaydet (Commit) f69eb5b7 authored tarafından Michael Stahl's avatar Michael Stahl

dbaccess: databasecontext.cxx: copy m_aDatabaseObjects

this fixes an STL assertion due to invalidated iterator.
üst 3c6d38fe
...@@ -283,8 +283,10 @@ void ODatabaseContext::disposing() ...@@ -283,8 +283,10 @@ void ODatabaseContext::disposing()
m_aContainerListeners.disposeAndClear(aDisposeEvent); m_aContainerListeners.disposeAndClear(aDisposeEvent);
// dispose the data sources // dispose the data sources
ObjectCache::iterator aEnd = m_aDatabaseObjects.end(); // disposing seems to remove elements, so work on copy for valid iterators
for ( ObjectCache::iterator aIter = m_aDatabaseObjects.begin(); ObjectCache objCopy(m_aDatabaseObjects);
ObjectCache::iterator const aEnd = objCopy.end();
for ( ObjectCache::iterator aIter = objCopy.begin();
aIter != aEnd; aIter != aEnd;
++aIter ++aIter
) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment