diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-09-01 12:19:40 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-09-01 22:34:40 +0200 |
commit | a453cafde419d186625c191154d8d6178f0149d0 (patch) | |
tree | f9d65c9d79755aea0a523a68356a945dea02d830 /accessibility | |
parent | 3eaa478edbe23cc5b7730c8e43050f2099d5912a (diff) |
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.weghorn@posteo.de>
(cherry picked from commit e3b4bb25d4ef1684e1a370a34bc13ec65df23ea5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156433
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/source/extended/accessiblelistboxentry.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
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); |