diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-01 19:27:34 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-11-10 19:47:00 +0100 |
commit | 31fb4ceefdd2f4a9bc2334ea35e2c7c789ba6c0b (patch) | |
tree | bec9e1a1a0648c1e0358389e2a6130fa4e79c7f6 /sw | |
parent | 00f341c701ba3aee69e20f05f2f8136ca4726b51 (diff) |
sw_redlinehide_3: SwTextNode::AddToList ignore Undo-array nodes
The node is moved between undo-array and doc-array and each time
AddToList is called; it doesn't make sense to add a node that is
currently in undo-array to a list, and it leaks the mpNodeNum
because IsInList will return false because the SwNodeNum lacks a
parent, and it triggers some recently added asserts,
so just don't do that.
Change-Id: I75e51386806ce3845b7c61206020a59c092577fe
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index a02e880e8bd9..24db0556160f 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -4274,7 +4274,7 @@ void SwTextNode::AddToList() } SwList *const pList(FindList(this)); - if (pList) + if (pList && GetNodes().IsDocNodes()) // not for undo nodes { assert(!mpNodeNum); mpNodeNum = new SwNodeNum(this, false); |