Merge pull request #666 from BimDav/fix_variant_operator=

pull/667/head
Rémi Verschelde 2021-12-03 12:09:51 +01:00 committed by GitHub
commit 4efceefe13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) { Variant &Variant::operator=(const Variant &v) {
godot::api->godot_variant_destroy(&_godot_variant);
godot::api->godot_variant_new_copy(&_godot_variant, &v._godot_variant); godot::api->godot_variant_new_copy(&_godot_variant, &v._godot_variant);
return *this; return *this;
} }