summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-05-10 13:35:26 +0200
committerMichael Stahl <mstahl@redhat.com>2017-05-10 18:01:09 +0200
commitffe239962f195781c6b086c5a284aad333e3e12e (patch)
tree3df7bc31587e3362aa1ace55dbc4aeb58df580f4 /sw/source
parent60901e880b215d06ab3a7d79d2041bb2c6c64a78 (diff)
sw: avoid assert in SwUndoDelete::RedoImpl
1. insert as-char fly in paragraph 2. hit DEL to delete it 3. Undo 4. Redo Assertion `aTmp.GetPoint()->nNode != rPam.GetPoint()->nNode && aTmp.GetPoint()->nNode != rPam.GetMark()->nNode' failed This was added in e06131e96629eee4e94eba1da7242380716e8e88 assuming that this branch is only reachable with m_bDelFullPara, but it turns out that you get no start/end text also because DelContentIndex() already deleted everything. Change-Id: If4ce55dd4b63d6db11ed3195f78cd595149c0c1b
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/undo/undel.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 566a268af6e6..565405c1bcab 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -1048,6 +1048,12 @@ void SwUndoDelete::RedoImpl(::sw::UndoRedoContext & rContext)
}
pTableNd->DelFrames();
}
+ else if (*rPam.GetMark() == *rPam.GetPoint())
+ { // paragraph with only footnote or as-char fly, delete that
+ // => DelContentIndex has already deleted it! nothing to do here
+ assert(nEndNode == nSttNode);
+ return;
+ }
// avoid asserts from ~SwIndexReg for deleted nodes
SwPaM aTmp(*rPam.End());