Call Variant destructor in operator=

pull/666/head
BimDav 2021-12-03 11:11:32 +01:00
parent b31e690a91
commit a93f7f9e73
1 changed files with 1 additions and 0 deletions

View File

@ -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;
}