From a93f7f9e73bf10899daa6b207c68d97f80d82d8a Mon Sep 17 00:00:00 2001 From: BimDav <67792882+BimDav@users.noreply.github.com> Date: Fri, 3 Dec 2021 11:11:32 +0100 Subject: [PATCH] Call Variant destructor in operator= --- src/core/Variant.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/Variant.cpp b/src/core/Variant.cpp index a0b50df2..2f2be90f 100644 --- a/src/core/Variant.cpp +++ b/src/core/Variant.cpp @@ -188,6 +188,7 @@ Variant::Variant(const PoolColorArray &p_color_array) { } Variant &Variant::operator=(const Variant &v) { + godot::api->godot_variant_destroy(&_godot_variant); godot::api->godot_variant_new_copy(&_godot_variant, &v._godot_variant); return *this; }