summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorLászló Németh <laszlo.nemeth@collabora.com>2015-06-15 10:52:22 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-06-15 13:28:09 +0000
commitdc5fb55f8211645ad5d6358625938e4bc015cb68 (patch)
tree7cecb2ef7b44e8a07a94a2e5998e45ba869fb516 /sfx2
parenta8f1fd297b00fbd25a84d9e31f00e3d32bc12e3f (diff)
tdf#91721: fix crash during listbox control editing in database form
(cherry-picked from d505f1600d9aeb095405b9f62eaf444d5d399860) Change-Id: I415ccb6132b802f62c93367a050242aee3c128b1 Reviewed-on: https://gerrit.libreoffice.org/16286 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/bindings.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 3d696cb23cdd..cf4c8a875dde 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -1030,8 +1030,8 @@ void SfxBindings::Release( SfxControllerItem& rItem )
// find the bound function
sal_uInt16 nId = rItem.GetId();
sal_uInt16 nPos = GetSlotPos(nId);
- SfxStateCache* pCache = (*pImp->pCaches)[nPos];
- if ( pCache->GetId() == nId )
+ SfxStateCache* pCache = (nPos < pImp->pCaches->size()) ? (*pImp->pCaches)[nPos] : 0;
+ if ( pCache && pCache->GetId() == nId )
{
if ( pCache->GetInternalController() == &rItem )
{