[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sfx2/source

László Németh laszlo.nemeth at collabora.com
Mon Jun 15 06:28:42 PDT 2015


 sfx2/source/control/bindings.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit dc5fb55f8211645ad5d6358625938e4bc015cb68
Author: László Németh <laszlo.nemeth at collabora.com>
Date:   Mon Jun 15 10:52:22 2015 +0200

    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 at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index 3d696cb..cf4c8a8 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 )
         {


More information about the Libreoffice-commits mailing list