sw/source/core/access/accmap.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
New commits: commit dd0ca80d887ad174511302ffadacd61447e93420 Author: Caolán McNamara <[email protected]> AuthorDate: Mon Aug 22 10:01:48 2022 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Mon Aug 22 15:06:34 2022 +0200 cid#1500530 return early to silence Dereference after null check Change-Id: Ia549ae31c7f13d70228620ffb4bce78ea95ba083 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138673 Tested-by: Caolán McNamara <[email protected]> Reviewed-by: Caolán McNamara <[email protected]> diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index e191c5cd8b4e..262e14d6ac82 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -2417,13 +2417,13 @@ void SwAccessibleMap::InvalidateContent( const SwFrame *pFrame ) { osl::MutexGuard aGuard( maMutex ); - if( mpFrameMap ) - { - SwAccessibleContextMap_Impl::iterator aIter = - mpFrameMap->find( aFrameOrObj.GetSwFrame() ); - if( aIter != mpFrameMap->end() ) - xAcc = (*aIter).second; - } + if (!mpFrameMap) + return; + + SwAccessibleContextMap_Impl::iterator aIter = + mpFrameMap->find( aFrameOrObj.GetSwFrame() ); + if( aIter != mpFrameMap->end() ) + xAcc = (*aIter).second; } if( !xAcc.is() )
