diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2023-09-01 12:19:40 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2023-09-01 20:38:27 +0200 |
commit | e3b4bb25d4ef1684e1a370a34bc13ec65df23ea5 (patch) | |
tree | 887f11df6a6ff78b502b255a9af63f1d90c814e6 /accessibility | |
parent | 4f60660bca1796184a4fe079b5ecdd562a36aa32 (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>
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 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); |