Kaydet (Commit) eccf7718 authored tarafından Caolán McNamara's avatar Caolán McNamara

directly get matching a11y if it exists

rather than check if it exists, and then get it if it exists

I wonder if the else branch from...

commit 0c2229dc
Date:   Fri Mar 24 13:04:32 2017 +0100

    tdf#58624 sw: fix ~SwAccessibleContext() use-after-free race

is still relevant after this

Change-Id: Idabea01f0c450b07b75214c5a83460e1d0319802
Reviewed-on: https://gerrit.libreoffice.org/54904Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 39eecc51
...@@ -401,13 +401,8 @@ void SwAccessibleContext::DisposeChildren(const SwFrame *pFrame, ...@@ -401,13 +401,8 @@ void SwAccessibleContext::DisposeChildren(const SwFrame *pFrame,
const SwFrame* pLower = rLower.GetSwFrame(); const SwFrame* pLower = rLower.GetSwFrame();
if( pLower ) if( pLower )
{ {
::rtl::Reference< SwAccessibleContext > xAccImpl; // tdf#117601 dispose the darn thing if it ever was accessible
if (rLower.IsAccessible(GetShell()->IsPreview()) ::rtl::Reference<SwAccessibleContext> xAccImpl = GetMap()->GetContextImpl(pLower, false);
// tdf#117601 dispose the darn thing if it ever was accessible
|| GetMap()->Contains(pLower))
{
xAccImpl = GetMap()->GetContextImpl( pLower, false );
}
if( xAccImpl.is() ) if( xAccImpl.is() )
xAccImpl->Dispose( bRecursive ); xAccImpl->Dispose( bRecursive );
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment