summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
Diffstat (limited to 'package')
-rw-r--r--package/source/xstor/xstorage.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index f29ecfd3ea0a..492d96692f65 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -1904,19 +1904,16 @@ void OStorage::ChildIsDisposed( const uno::Reference< uno::XInterface >& xChild
// this method must not contain any locking
// the locking is done in the listener
- if ( !m_pData->m_aOpenSubComponentsVector.empty() )
+ for ( WeakComponentVector::iterator pCompIter = m_pData->m_aOpenSubComponentsVector.begin();
+ pCompIter != m_pData->m_aOpenSubComponentsVector.end(); )
{
- for ( WeakComponentVector::iterator pCompIter = m_pData->m_aOpenSubComponentsVector.begin();
- pCompIter != m_pData->m_aOpenSubComponentsVector.end(); )
+ uno::Reference< lang::XComponent > xTmp = (*pCompIter);
+ if ( !xTmp.is() || xTmp == xChild )
{
- uno::Reference< lang::XComponent > xTmp = (*pCompIter);
- if ( !xTmp.is() || xTmp == xChild )
- {
- pCompIter = m_pData->m_aOpenSubComponentsVector.erase(pCompIter);
- }
- else
- ++pCompIter;
+ pCompIter = m_pData->m_aOpenSubComponentsVector.erase(pCompIter);
}
+ else
+ ++pCompIter;
}
}