From cf561446e4779208ab571c9699d02d367f9c8ea0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Thu, 13 Mar 2014 16:01:23 +0000 Subject: a crash sometimes seen in a11y in base Change-Id: Id8b7c8394a4e8bc1477c34056b8014d311186d7e --- .../source/extended/accessiblelistboxentry.cxx | 29 +++++++++++----------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'accessibility') diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx index 245cd5293c47..7385f5233e35 100644 --- a/accessibility/source/extended/accessiblelistboxentry.cxx +++ b/accessibility/source/extended/accessiblelistboxentry.cxx @@ -531,24 +531,25 @@ namespace accessibility switch(getAccessibleRole()) { case AccessibleRole::LABEL: - pStateSetHelper->AddState( AccessibleStateType::TRANSIENT ); - pStateSetHelper->AddState( AccessibleStateType::SELECTABLE ); - pStateSetHelper->AddState( AccessibleStateType::ENABLED ); - if ( getListBox()->IsInplaceEditingEnabled() ) - pStateSetHelper->AddState( AccessibleStateType::EDITABLE ); - if ( IsShowing_Impl() ) - pStateSetHelper->AddState( AccessibleStateType::SHOWING ); + pStateSetHelper->AddState( AccessibleStateType::TRANSIENT ); + pStateSetHelper->AddState( AccessibleStateType::SELECTABLE ); + pStateSetHelper->AddState( AccessibleStateType::ENABLED ); + if (getListBox()->IsInplaceEditingEnabled()) + pStateSetHelper->AddState( AccessibleStateType::EDITABLE ); + if (IsShowing_Impl()) + pStateSetHelper->AddState( AccessibleStateType::SHOWING ); break; case AccessibleRole::CHECK_BOX: - pStateSetHelper->AddState( AccessibleStateType::TRANSIENT ); - pStateSetHelper->AddState( AccessibleStateType::SELECTABLE ); - pStateSetHelper->AddState( AccessibleStateType::ENABLED ); - if ( IsShowing_Impl() ) - pStateSetHelper->AddState( AccessibleStateType::SHOWING ); + pStateSetHelper->AddState( AccessibleStateType::TRANSIENT ); + pStateSetHelper->AddState( AccessibleStateType::SELECTABLE ); + pStateSetHelper->AddState( AccessibleStateType::ENABLED ); + if (IsShowing_Impl()) + pStateSetHelper->AddState( AccessibleStateType::SHOWING ); break; } - getListBox()->FillAccessibleEntryStateSet( - getListBox()->GetEntryFromPath( m_aEntryPath ), *pStateSetHelper ); + SvTreeListEntry *pEntry = getListBox()->GetEntryFromPath(m_aEntryPath); + if (pEntry) + getListBox()->FillAccessibleEntryStateSet(pEntry, *pStateSetHelper); } else pStateSetHelper->AddState( AccessibleStateType::DEFUNC ); -- cgit