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

New commits:
commit e3b4bb25d4ef1684e1a370a34bc13ec65df23ea5
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Sep 1 12:19:40 2023 +0200
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Fri Sep 1 20:38:27 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>

diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx 
b/accessibility/source/extended/accessiblelistboxentry.cxx
index e0c96fe8d845..db994d94fcd1 100644
--- a/accessibility/source/extended/accessiblelistboxentry.cxx
+++ b/accessibility/source/extended/accessiblelistboxentry.cxx
@@ -788,9 +788,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