[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 21 11:48:21 UTC 2021


 sw/source/core/layout/ftnfrm.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 9d8954197cc2b6e57db56abe18bfc782a1a715a6
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Jun 21 11:08:05 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Jun 21 13:47:38 2021 +0200

    cid#1486007 establish that SwFootnoteFrame::Paste doesn't delete itself
    
    Change-Id: Ifbc1fc73be6824917dfe91811ecb5b58409f042e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117551
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index d65d7c70d546..ce7bc0b7c073 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -621,6 +621,7 @@ void SwFootnoteFrame::Paste(  SwFrame* pParent, SwFrame* pSibling )
         SwFlowFrame::CastFlowFrame( GetPrev()->GetLower())->
             MoveSubTree( this, GetLower() );
         SwFrame *pDel = GetPrev();
+        assert(pDel != this);
         pDel->Cut();
         SwFrame::DestroyFrame(pDel);
     }
@@ -630,6 +631,7 @@ void SwFootnoteFrame::Paste(  SwFrame* pParent, SwFrame* pSibling )
                 "Footnote without content?" );
         SwFlowFrame::CastFlowFrame( GetNext()->GetLower() )->MoveSubTree( this );
         SwFrame *pDel = GetNext();
+        assert(pDel != this);
         pDel->Cut();
         SwFrame::DestroyFrame(pDel);
     }


More information about the Libreoffice-commits mailing list