summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-06-21 11:08:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-06-21 13:47:38 +0200
commit9d8954197cc2b6e57db56abe18bfc782a1a715a6 (patch)
tree24651a8a138fd43d3f725c6b9c45835009de4081 /sw
parent804f4e8ae071c7a73c64b6327f251c6a649468f0 (diff)
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@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/layout/ftnfrm.cxx2
1 files changed, 2 insertions, 0 deletions
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);
}