summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-01-12 14:03:43 +0000
committerMichael Stahl <mstahl@redhat.com>2017-01-13 20:32:29 +0000
commit252f2d4978e5861cb62cca7c1553be63a7bae119 (patch)
treee891b727d974f8b0e7032e0c65772655f7a841fc /accessibility
parent10a7f48aa83aaf78ccd09d3cab1a961aa1e8219e (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/32997 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/source/standard/vclxaccessibletabcontrol.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/accessibility/source/standard/vclxaccessibletabcontrol.cxx b/accessibility/source/standard/vclxaccessibletabcontrol.cxx
index 12837d670918..b715964bac0b 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 >() );
}