summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorLászló Németh <laszlo.nemeth@collabora.com>2015-06-15 10:52:22 +0200
committerLászló Németh <laszlo.nemeth@collabora.com>2015-06-15 11:00:25 +0200
commitd505f1600d9aeb095405b9f62eaf444d5d399860 (patch)
tree99bd09461408072c4d98e085fa4a090d902f03c9 /sfx2
parent0c18bedb7328493040c1a20822b345e624d6041f (diff)
tdf#91721: fix crash during listbox control editing in database form
Change-Id: I415ccb6132b802f62c93367a050242aee3c128b1
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 8c387037d62d..cc65fa6e47d0 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 )
{