diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-02-04 10:08:09 +0000 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-02-04 13:12:25 +0100 |
commit | c674f8d9fe5d6cda417bfdd71609ca6743595124 (patch) | |
tree | d169a5575a04b13be6c8fe451d79d38a4afbaaf7 | |
parent | cid#1591487 Dereference after null check (diff) | |
download | core-c674f8d9fe5d6cda417bfdd71609ca6743595124.tar.gz core-c674f8d9fe5d6cda417bfdd71609ca6743595124.zip |
just call pSFly->Lower() once
Change-Id: I35c11a41503ee6f23c8692fa75d0fe4a7e7a323a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162970
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | sw/source/core/layout/atrfrm.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index 26b466588d35..15d2d309d571 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -2632,14 +2632,15 @@ void SwFrameFormat::SetFormatName( const OUString& rNewName, bool bBroadcast ) { if (SwFlyFrame* pSFly = SwIterator<SwFlyFrame, SwFormat>(*this).First()) { - if (pSFly->Lower() && !pSFly->Lower()->IsNoTextFrame()) + SwFrame *pSFlyLower = pSFly->Lower(); + if (pSFlyLower && !pSFlyLower->IsNoTextFrame()) { if (SwTextNode* pSwTxtNode = static_cast<SwTextFrame*>(pSFly->ContainsContent())->GetTextNodeFirst()) pSwTxtNode->resetAndQueueAccessibilityCheck(true); } else { - if (SwNode* pSwNode = static_cast<SwNoTextFrame*>(pSFly->Lower())->GetNode()) + if (SwNode* pSwNode = static_cast<SwNoTextFrame*>(pSFlyLower)->GetNode()) pSwNode->resetAndQueueAccessibilityCheck(true); } } |