diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-12 14:03:43 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-01-12 14:04:11 +0000 |
commit | ff30d20c1ae3a30717123c267d52eb2b3105a1b7 (patch) | |
tree | 8504f23b4ff8b354fc8eb1447f631a2445a026ed /accessibility | |
parent | 0373db40fd43de7a8badcf6c3d0b9b44a2e05891 (diff) |
a11y crash on accessing disposed TabControl during close of impress
Change-Id: I3064eb136ed3a6a32acd64bfb2f6fbe31595e1cf
Diffstat (limited to 'accessibility')
-rw-r--r-- | accessibility/source/standard/vclxaccessibletabcontrol.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx index 637e0b656e97..17762a1a1472 100644 --- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx +++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx @@ -43,9 +43,14 @@ VCLXAccessibleTabControl::VCLXAccessibleTabControl( VCLXWindow* pVCLXWindow ) :VCLXAccessibleComponent( pVCLXWindow ) { m_pTabControl = static_cast< TabControl* >( GetWindow().get() ); - - if ( m_pTabControl ) - m_aAccessibleChildren.assign( m_pTabControl->GetPageCount(), Reference< XAccessible >() ); + if (!m_pTabControl) + return; + if (m_pTabControl->isDisposed()) + { + m_pTabControl.clear(); + return; + } + m_aAccessibleChildren.assign( m_pTabControl->GetPageCount(), Reference< XAccessible >() ); } |