vcl/unx/gtk3/a11y/atklistener.cxx |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit e4f5c7e3bf9a791ce777d1027aa17c93ad8f28a3
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Mon May 8 16:04:21 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue May 9 02:02:48 2023 +0200

    tdf#155186 crash Inserting tables and switching slides (gtk3)
    
    regression from
    
        commit 3b7db802731826b6cc3b55100470b0c61c1f2dfa
        Author: Noel Grandin <noel.gran...@collabora.co.uk>
        Date:   Thu May 4 10:06:14 2023 +0200
        tdf#105404 [API CHANGE] add index to accessiblity change event
    
    where something is forgetting to send events for some of the changes, so
    just ignore a bad indexhint here
    
    Change-Id: I9228b480be10b2f267c2a76cb30a9faf1476639e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151536
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/vcl/unx/gtk3/a11y/atklistener.cxx 
b/vcl/unx/gtk3/a11y/atklistener.cxx
index 130e69e1e249..854e43133112 100644
--- a/vcl/unx/gtk3/a11y/atklistener.cxx
+++ b/vcl/unx/gtk3/a11y/atklistener.cxx
@@ -171,6 +171,12 @@ void AtkListener::handleChildAdded(
     if( !pChild )
         return;
 
+    if (nIndexHint != -1 && (nIndexHint < 0 || nIndexHint >= 
static_cast<sal_Int32>(m_aChildList.size())))
+    {
+        SAL_WARN("vcl", "index hint out of range, ignoring");
+        nIndexHint = -1;
+    }
+
     bool bNeedToFullFullChildList = true;
     if (nIndexHint != -1)
     {

Reply via email to