mirror of
https://github.com/corda/corda.git
synced 2025-01-23 21:08:48 +00:00
fix GC safety bug in cloneTreeNode
This commit is contained in:
parent
33b32398c2
commit
7eef2e7918
@ -50,6 +50,8 @@ setTreeNodeRed(Thread*, object n, bool red)
|
|||||||
inline object
|
inline object
|
||||||
cloneTreeNode(Thread* t, object n)
|
cloneTreeNode(Thread* t, object n)
|
||||||
{
|
{
|
||||||
|
PROTECT(t, n);
|
||||||
|
|
||||||
object newNode = makeTreeNode
|
object newNode = makeTreeNode
|
||||||
(t, getTreeNodeValue(t, n), treeNodeLeft(t, n), treeNodeRight(t, n));
|
(t, getTreeNodeValue(t, n), treeNodeLeft(t, n), treeNodeRight(t, n));
|
||||||
setTreeNodeRed(t, newNode, treeNodeRed(t, n));
|
setTreeNodeRed(t, newNode, treeNodeRed(t, n));
|
||||||
|
Loading…
Reference in New Issue
Block a user