accessibility/source/extended/accessiblelistboxentry.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit a453cafde419d186625c191154d8d6178f0149d0
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Sep 1 12:19:40 2023 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Fri Sep 1 22:34:40 2023 +0200

    accessibility: fix crash in getAccessibleActionDescription
    
    See 
https://crashreport.libreoffice.org/stats/signature/SvTreeListEntry::HasChildren()
    
    Change-Id: I21879ad531a5c61b3a6808c373454522557e2ff9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156403
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>
    (cherry picked from commit e3b4bb25d4ef1684e1a370a34bc13ec65df23ea5)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156433
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx 
b/accessibility/source/extended/accessiblelistboxentry.cxx
index 013bb940ca80..f456844b8ee8 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -794,9 +794,10 @@ namespace accessibility
                 //Sometimes, a List or Tree may have both checkbox and label 
at the same time
                 return OUString();
             }
-        }else if( (nIndex == 1 && (treeFlag & SvTreeFlags::CHKBTN)) || nIndex 
== 0 )
+        }
+        else if( (nIndex == 1 && (treeFlag & SvTreeFlags::CHKBTN)) || nIndex 
== 0 )
         {
-            if( pEntry->HasChildren() || pEntry->HasChildrenOnDemand() )
+            if( pEntry && (pEntry->HasChildren() || 
pEntry->HasChildrenOnDemand()) )
                 return m_pTreeListBox->IsExpanded( pEntry ) ?
                 AccResId(STR_SVT_ACC_ACTION_COLLAPSE) :
                 AccResId(STR_SVT_ACC_ACTION_EXPAND);

Reply via email to