sw/source/core/layout/atrfrm.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit c674f8d9fe5d6cda417bfdd71609ca6743595124
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Sun Feb 4 10:08:09 2024 +0000
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Sun Feb 4 13:12:25 2024 +0100

    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.mcnam...@collabora.com>

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);
                 }
             }

Reply via email to