[Libreoffice-commits] core.git: sfx2/source
Caolán McNamara
caolanm at redhat.com
Sat May 11 04:14:01 PDT 2013
sfx2/source/control/bindings.cxx | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
commit 2623f4854d4bffe0babbc0c11ebdaccf18908abd
Author: Caolán McNamara <caolanm at redhat.com>
Date: Sat May 11 12:10:30 2013 +0100
GetSlotServer can invalidate iterators into the slot cache
Regression since d3a279cbd308486250e2b652aac01d41e2a52f14
Change-Id: I0113c5a8060eb598c4f3bcee5580658c347b66ac
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 722c93f..80edb43 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1315,9 +1315,10 @@ void SfxBindings::UpdateSlotServer_Impl()
pImp->bContextChanged = sal_True;
}
- for(SfxStateCacheArr_Impl::const_iterator it = pImp->pCaches->begin(); it != pImp->pCaches->end(); ++it)
+ for (size_t i = 0, nCount = pImp->pCaches->size(); i < nCount; ++i)
{
- SfxStateCache *pCache = *it;
+ SfxStateCache *pCache = (*pImp->pCaches)[i];
+ //GetSlotServer can modify pImp->pCaches
pCache->GetSlotServer(*pDispatcher, pImp->xProv);
}
pImp->bMsgDirty = pImp->bAllMsgDirty = sal_False;
More information about the Libreoffice-commits
mailing list