summaryrefslogtreecommitdiff
path: root/value.cc
diff options
context:
space:
mode:
Diffstat (limited to 'value.cc')
-rw-r--r--value.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/value.cc b/value.cc
index bf235257..83307dc0 100644
--- a/value.cc
+++ b/value.cc
@@ -22,6 +22,9 @@ void value_t::destroy()
value_t& value_t::operator=(const value_t& value)
{
+ if (this == &value)
+ return *this;
+
destroy();
switch (value.type) {
case BOOLEAN: