Skip to content

Commit 4efceef

Browse files
authored
Merge pull request #666 from BimDav/fix_variant_operator=
2 parents b31e690 + a93f7f9 commit 4efceef

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/core/Variant.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,7 @@ Variant::Variant(const PoolColorArray &p_color_array) {
188188
}
189189

190190
Variant &Variant::operator=(const Variant &v) {
191+
godot::api->godot_variant_destroy(&_godot_variant);
191192
godot::api->godot_variant_new_copy(&_godot_variant, &v._godot_variant);
192193
return *this;
193194
}

0 commit comments

Comments
 (0)