[Libreoffice-commits] core.git: package/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Sat Nov 24 20:37:45 UTC 2018
package/source/xstor/ohierarchyholder.cxx | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
New commits:
commit 487ed7fdd6ea9687336112afcd80e7e8d723b8fc
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sat Nov 24 18:54:39 2018 +0100
Commit: Julien Nabet <serval2412 at yahoo.fr>
CommitDate: Sat Nov 24 21:37:24 2018 +0100
Use returned iterator by list::erase
Change-Id: I42312f5cbd0de65cc8915e6833eff668d244f66b
Reviewed-on: https://gerrit.libreoffice.org/63956
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
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();
More information about the Libreoffice-commits
mailing list