sw/source/core/layout/tabfrm.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit cf01ebf64634a014ca73bb7c042f6516123ae4eb
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Sat Apr 2 20:20:10 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Sat Apr 2 22:08:09 2022 +0200

    Related: forcepoint#100 we don't need pAttrs for the duration of the full 
scope
    
    similar to the case of
    
    commit 6b1eae0334ba8bad7656a859695551ce51b62f95
    Date:   Fri May 18 08:26:14 2001 +0000
    
        Fix #87058#: Locked boraderattribut
    
    the SwCache object cannot be deleted if its locked, leading to a leak,
    we don't need pAttrs for the entire scope here so we can defer to the
    end of the scope the reacquire the lock to set pAttrs
    
    Change-Id: I430331868b977e57121e968425a2377b395ea7eb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132459
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index e9f552da300a..210d69582992 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -2600,9 +2600,6 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
 
                             GetFollow()->MakeAll(pRenderContext);
 
-                            oAccess.emplace(SwFrame::GetCache(), this);
-                            pAttrs = oAccess->Get();
-
                             GetFollow()->SetLowersFormatted(false);
                             // #i43913# - lock follow table
                             // to avoid its formatting during the format of
@@ -2645,6 +2642,9 @@ void SwTabFrame::MakeAll(vcl::RenderContext* 
pRenderContext)
                                     }
                                 }
                             }
+
+                            oAccess.emplace(SwFrame::GetCache(), this);
+                            pAttrs = oAccess->Get();
                             --nStack;
                         }
                         else if ( GetFollow() == GetNext() )

Reply via email to