sw/source/core/layout/colfrm.cxx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
New commits: commit e9e2b79e6ba9c275cf451861184de4e53f9b6776 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Sun Mar 3 14:05:39 2024 +0000 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Mar 4 12:08:46 2024 +0100 cid#1545317 this didn't help in the end to silence Use after free so just ditch it, crashtesting didn't find anything anyhow. Change-Id: I117bbbb5b78b93e06174357bd11b10f0a8859a8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164302 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx index 3d8e1d12c9f7..872bdc44aef1 100644 --- a/sw/source/core/layout/colfrm.cxx +++ b/sw/source/core/layout/colfrm.cxx @@ -81,7 +81,7 @@ void SwColumnFrame::dumpAsXml(xmlTextWriterPtr writer) const (void)xmlTextWriterEndElement(writer); } -static void lcl_RemoveColumns(SwLayoutFrame *pCont, sal_uInt16 nCnt, const SwFrame *pSave) +static void lcl_RemoveColumns( SwLayoutFrame *pCont, sal_uInt16 nCnt ) { OSL_ENSURE( pCont && pCont->Lower() && pCont->Lower()->IsColumnFrame(), "no columns to remove." ); @@ -98,7 +98,6 @@ static void lcl_RemoveColumns(SwLayoutFrame *pCont, sal_uInt16 nCnt, const SwFra { SwColumnFrame *pTmp = static_cast<SwColumnFrame*>(pColumn->GetPrev()); pColumn->Cut(); - assert(pColumn != pSave && "we will deref pSave later, so shouldn't be deleted here"); (void)pSave; SwFrame::DestroyFrame(pColumn); //format is going to be destroyed in the DTor if needed. pColumn = pTmp; } @@ -248,7 +247,7 @@ void SwLayoutFrame::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew //If columns exist, they get deleted if a column count of 0 or 1 is requested. if ( nNewNum == 1 && !bAtEnd ) { - ::lcl_RemoveColumns( this, nOldNum, pSave ); + ::lcl_RemoveColumns( this, nOldNum ); if ( IsBodyFrame() ) SetFrameFormat( pDoc->GetDfltFrameFormat() ); else @@ -268,7 +267,7 @@ void SwLayoutFrame::ChgColumns( const SwFormatCol &rOld, const SwFormatCol &rNew } if ( nOldNum > nNewNum ) { - ::lcl_RemoveColumns( this, nOldNum - nNewNum, pSave ); + ::lcl_RemoveColumns( this, nOldNum - nNewNum ); bAdjustAttributes = true; } else if( nOldNum < nNewNum )