diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-13 16:01:23 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-13 16:24:15 +0000 |
commit | cf561446e4779208ab571c9699d02d367f9c8ea0 (patch) | |
tree | d4d70d6bc238f9264cd7fdd72f54412a5191cb3c /accessibility | |
parent | 5ec909f196051657ffb4831ca407eb5e6b986a0d (diff) |
a crash sometimes seen in a11y in base
Change-Id: Id8b7c8394a4e8bc1477c34056b8014d311186d7e
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/source/extended/accessiblelistboxentry.cxx | 29 |
1 files changed, 15 insertions, 14 deletions
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 ); |