diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-05-28 09:50:09 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-05-28 14:54:04 +0200 |
commit | eccf771815eefb826f5bb8597277020ec297edf1 (patch) | |
tree | 2a7afdc4edfff6199a373db8539b5c79db7607dc | |
parent | 39eecc510667c8b1be9d3a031f7a30ae5be18040 (diff) |
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 0c2229dcab143925c6ad390e0735e2d98c3eecca
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/54904
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/access/acccontext.cxx | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index efb6b415d372..b1d7e2f810ad 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -401,13 +401,8 @@ void SwAccessibleContext::DisposeChildren(const SwFrame *pFrame, const SwFrame* pLower = rLower.GetSwFrame(); if( pLower ) { - ::rtl::Reference< SwAccessibleContext > xAccImpl; - if (rLower.IsAccessible(GetShell()->IsPreview()) - // tdf#117601 dispose the darn thing if it ever was accessible - || GetMap()->Contains(pLower)) - { - xAccImpl = GetMap()->GetContextImpl( pLower, false ); - } + // tdf#117601 dispose the darn thing if it ever was accessible + ::rtl::Reference<SwAccessibleContext> xAccImpl = GetMap()->GetContextImpl(pLower, false); if( xAccImpl.is() ) xAccImpl->Dispose( bRecursive ); else |