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-15 15:10:04 +0100 |
commit | a823343fd36fa222f2a79d7325ce0524f0375b93 (patch) | |
tree | f2a331c213b053fc6c63dfb1d54bbb8719352321 /sw | |
parent | b75d209fbcb78cd218d6f5c5fa54390798f85bbb (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); |