fix GC safety bug in cloneTreeNode

This commit is contained in:
Joel Dice 2008-04-11 17:40:36 -06:00
parent 33b32398c2
commit 7eef2e7918

View File

@ -50,6 +50,8 @@ setTreeNodeRed(Thread*, object n, bool red)
inline object
cloneTreeNode(Thread* t, object n)
{
PROTECT(t, n);
object newNode = makeTreeNode
(t, getTreeNodeValue(t, n), treeNodeLeft(t, n), treeNodeRight(t, n));
setTreeNodeRed(t, newNode, treeNodeRed(t, n));