aboutsummaryrefslogtreecommitdiff
path: root/src/nix
diff options
context:
space:
mode:
Diffstat (limited to 'src/nix')
-rw-r--r--src/nix/repl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nix/repl.cc b/src/nix/repl.cc
index bb067e935..b1f250e73 100644
--- a/src/nix/repl.cc
+++ b/src/nix/repl.cc
@@ -537,8 +537,8 @@ bool NixRepl::processLine(string line)
isVarName(name = removeWhitespace(string(line, 0, p))))
{
Expr * e = parseString(string(line, p + 1));
- Value & v(*state->allocValue());
- v.mkThunk(env, e);
+ Value *v = new Value(*state->allocValue());
+ v->mkThunk(env, e);
addVarToScope(state->symbols.create(name), v);
} else {
Value v;