Skip to content

Commit 78be4f7

Browse files
committed
fix critical bug causing double destroy of shadowed variables
1 parent 76a5345 commit 78be4f7

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

src/pscript/context.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@ ps::variable& context::create_variable(std::string const& name, ps::value&& init
301301
if (auto old = variables.find(name); old != variables.end()) {
302302
// Variable already exists, so shadow it with a new type by assigning a new value to it.
303303
// We first need to free the old memory
304-
old->second.value().on_destroy();
305304
old->second.value() = std::move(initializer);
306305
return old->second;
307306
} else {

0 commit comments

Comments
 (0)