sw/source/core/table/swtable.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 213173edc5e47bb6da11f9a301f4dca71854a48c
Author:     László Németh <nem...@numbertext.org>
AuthorDate: Fri Dec 17 18:56:37 2021 +0100
Commit:     László Németh <nem...@numbertext.org>
CommitDate: Fri Dec 17 22:11:01 2021 +0100

    sw: fix crash with commit 8c028b7e41e3d350d0e67005b16faf0159cc5c12
    
    "tdf#146244 sw: update HasTextChangesOnly in modified rows".
    
    Change-Id: If0ce16681704fed41ab8d6e6b23033b82487f503
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127014
    Tested-by: Jenkins
    Reviewed-by: László Németh <nem...@numbertext.org>

diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 9033fdccbac5..183775c42ecc 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -1723,8 +1723,10 @@ SwRedlineTable::size_type 
SwTableLine::UpdateTextChangesOnly(SwRedlineTable::siz
             nRet = SwRedlineTable::npos;
             // set TextChangesOnly = true to remove the tracked deletion
             SvxPrintItem aUnsetTracking(RES_PRINT, true);
-            SwFrameFormat *pNew = 
const_cast<SwTableLine*>(this)->ClaimFrameFormat();
-            pNew->SetFormatAttr( aUnsetTracking );
+            SwFrameFormat *pFormat = 
const_cast<SwTableLine*>(this)->ClaimFrameFormat();
+            pFormat->LockModify();
+            pFormat->SetFormatAttr( aUnsetTracking );
+            pFormat->UnlockModify();
         }
     }
 

Reply via email to