diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-10-09 11:26:05 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-10-09 13:51:56 +0200 |
commit | 2fdfd6fcf6da5f11846c8c99943e24d85baf92c5 (patch) | |
tree | d6104117a7a3daa7a8d8bc7f250c0b1e7793c762 /sw | |
parent | eba135a844064a6f4a3a4f938d24b2b98dd99642 (diff) |
Resolves: tdf#128037 don't create a11y element just to destroy it
Change-Id: I8d613d30116c0201154773421b4f9eb829a94620
Reviewed-on: https://gerrit.libreoffice.org/80538
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/access/acccontext.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index b11cb6cf8329..d1436b3f0c1d 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -1080,16 +1080,18 @@ void SwAccessibleContext::DisposeChild( const SwAccessibleChild& rChildFrameOrOb if( rChildFrameOrObj.GetSwFrame() ) { ::rtl::Reference< SwAccessibleContext > xAccImpl = - GetMap()->GetContextImpl( rChildFrameOrObj.GetSwFrame() ); - xAccImpl->Dispose( bRecursive ); + GetMap()->GetContextImpl( rChildFrameOrObj.GetSwFrame(), false ); + if (xAccImpl) + xAccImpl->Dispose( bRecursive ); } else if ( rChildFrameOrObj.GetDrawObject() ) { ::rtl::Reference< ::accessibility::AccessibleShape > xAccImpl = GetMap()->GetContextImpl( rChildFrameOrObj.GetDrawObject(), - this ); - DisposeShape( rChildFrameOrObj.GetDrawObject(), - xAccImpl.get() ); + this, false ); + if (xAccImpl) + DisposeShape( rChildFrameOrObj.GetDrawObject(), + xAccImpl.get() ); } else if ( rChildFrameOrObj.GetWindow() ) { |