From 7eef2e79181f13a0b2c60de98a9ee9944f205984 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 11 Apr 2008 17:40:36 -0600 Subject: [PATCH] fix GC safety bug in cloneTreeNode --- src/util.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/util.cpp b/src/util.cpp index 7f7325f463..2c88d80bed 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -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));