diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-01-12 14:03:43 +0000 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2017-04-23 17:47:52 +0200 |
commit | c7e53b608b20c90ad8ac22521228a04dea571629 (patch) | |
tree | 15e65a39446fb0e42776fab5910a24edee5e2370 /accessibility | |
parent | 72fab38c2e5c8deb3b0d6e65ec86bd0a9b8c5791 (diff) |
a11y crash on accessing disposed TabControl during close of impress
Change-Id: I3064eb136ed3a6a32acd64bfb2f6fbe31595e1cf
(cherry picked from commit ff30d20c1ae3a30717123c267d52eb2b3105a1b7)
Reviewed-on: https://gerrit.libreoffice.org/33007
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit ef191c51ee9912ebc0ef3c59f6d9a86ff09723b1)
(cherry picked from commit b740b779f605b75370ea3a845ad1a44f3dbed458)
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 d1ea190aab15..7b049c291a6a 100644 --- a/accessibility/source/standard/vclxaccessibletabcontrol.cxx +++ b/accessibility/source/standard/vclxaccessibletabcontrol.cxx @@ -44,9 +44,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 >() ); } |