summaryrefslogtreecommitdiff
path: root/sw/source/core/access/accmap.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-08-20 10:40:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2022-08-20 13:06:24 +0200
commitbdc753d06f1306877f8adfffd0f86be7a1a1f754 (patch)
tree7ff22becd699634d51d0b2412854bfdc80e1d365 /sw/source/core/access/accmap.cxx
parent9cabb7ca71dfc426b9925300c4214f05399bfd12 (diff)
cid#1500474 rearrange to avoid Dereference after null check
Change-Id: I0cb4a8bc80b73fe6048540fc368096131ae0c231 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138575 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source/core/access/accmap.cxx')
-rw-r--r--sw/source/core/access/accmap.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx
index c26a9eb22bee..2cb76f862e6c 100644
--- a/sw/source/core/access/accmap.cxx
+++ b/sw/source/core/access/accmap.cxx
@@ -2773,14 +2773,14 @@ void SwAccessibleMap::InvalidateRelationSet_( const SwFrame* pFrame,
{
osl::MutexGuard aGuard( maMutex );
- if( mpFrameMap )
+ if (!mpFrameMap)
+ return;
+
+ SwAccessibleContextMap_Impl::iterator aIter =
+ mpFrameMap->find( aFrameOrObj.GetSwFrame() );
+ if( aIter != mpFrameMap->end() )
{
- SwAccessibleContextMap_Impl::iterator aIter =
- mpFrameMap->find( aFrameOrObj.GetSwFrame() );
- if( aIter != mpFrameMap->end() )
- {
- xAcc = (*aIter).second;
- }
+ xAcc = (*aIter).second;
}
}