diff options
-rw-r--r-- | accessibility/source/extended/accessiblelistbox.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx index fb800403a302..bcb1c9f4b87c 100644 --- a/accessibility/source/extended/accessiblelistbox.cxx +++ b/accessibility/source/extended/accessiblelistbox.cxx @@ -343,9 +343,13 @@ namespace accessibility { ::comphelper::OExternalLockGuard aGuard( this ); + VclPtr<SvTreeListBox> pListBox = getListBox(); + if (!pListBox) + return AccessibleRole::LIST; + //o is: return AccessibleRole::TREE; - bool bHasButtons = (getListBox()->GetStyle() & WB_HASBUTTONS)!=0; - if(!bHasButtons && (getListBox()->GetTreeFlags() & SvTreeFlags::CHKBTN)) + bool bHasButtons = (pListBox->GetStyle() & WB_HASBUTTONS) != 0; + if (!bHasButtons && (pListBox->GetTreeFlags() & SvTreeFlags::CHKBTN)) return AccessibleRole::LIST; else if (GetRoleType() == 0) |