diff options
-rw-r--r-- | package/source/xstor/ohierarchyholder.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx index 5f6cf2291b54..800cfdf7ce1f 100644 --- a/package/source/xstor/ohierarchyholder.cxx +++ b/package/source/xstor/ohierarchyholder.cxx @@ -267,9 +267,14 @@ void SAL_CALL OHierarchyElement_Impl::disposing( const lang::EventObject& Source for ( OWeakStorRefList_Impl::iterator pStorageIter = m_aOpenStreams.begin(); pStorageIter != m_aOpenStreams.end(); ) { - OWeakStorRefList_Impl::iterator pTmp = pStorageIter++; - if ( !pTmp->get().is() || pTmp->get() == xStream ) - m_aOpenStreams.erase( pTmp ); + if ( !pStorageIter->get().is() || pStorageIter->get() == xStream ) + { + pStorageIter = m_aOpenStreams.erase(pStorageIter); + } + else + { + ++pStorageIter; + } } aGuard.clear(); |