From d505f1600d9aeb095405b9f62eaf444d5d399860 Mon Sep 17 00:00:00 2001 From: László Németh Date: Mon, 15 Jun 2015 10:52:22 +0200 Subject: tdf#91721: fix crash during listbox control editing in database form Change-Id: I415ccb6132b802f62c93367a050242aee3c128b1 --- sfx2/source/control/bindings.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sfx2') 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 ) { -- cgit