[Libreoffice-commits] core.git: sfx2/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Oct 16 14:02:05 UTC 2018


 sfx2/source/sidebar/FocusManager.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 0db54833da1048c0454b8bb564025b9072ee36d1
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Oct 16 13:09:37 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Oct 16 16:01:07 2018 +0200

    crashtesting: bad sidebar index during teardown as decks are removed
    
    Change-Id: I4b256aa10096b969a6d26c3ba2d5b7b640dd10bd
    Reviewed-on: https://gerrit.libreoffice.org/61830
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sfx2/source/sidebar/FocusManager.cxx b/sfx2/source/sidebar/FocusManager.cxx
index ab9afcfa6d93..85a9a7741630 100644
--- a/sfx2/source/sidebar/FocusManager.cxx
+++ b/sfx2/source/sidebar/FocusManager.cxx
@@ -65,6 +65,11 @@ void FocusManager::GrabFocusPanel()
 
 void FocusManager::GrabFocusButton(const sal_Int32 nIndex)
 {
+    if (static_cast<size_t>(nIndex) >= maButtons.size())
+    {
+        SAL_WARN("sfx.sidebar", "invalid focus index, probably during teardown");
+        return;
+    }
     FocusButton(nIndex);
 }
 


More information about the Libreoffice-commits mailing list