summaryrefslogtreecommitdiff
path: root/modules/gdscript
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-11-30 20:22:15 +0100
committerGitHub <noreply@github.com>2020-11-30 20:22:15 +0100
commit04bef80b42408f45d7838f9ef29f0e0553957475 (patch)
treec070bb40bd256567dff8b80c8f5c04df4e179669 /modules/gdscript
parent8f3dde18f1a264de5a71bee76a706d76111f2b17 (diff)
parent029fd88adbc95e32d8613d315fa81fa978ca04c3 (diff)
Merge pull request #43992 from vnen/variant-internal-object-set
Fix VariantInternal initialization and setting of object
Diffstat (limited to 'modules/gdscript')
-rw-r--r--modules/gdscript/gdscript_vm.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_vm.cpp b/modules/gdscript/gdscript_vm.cpp
index 7c8bfcd944..7942ee8d97 100644
--- a/modules/gdscript/gdscript_vm.cpp
+++ b/modules/gdscript/gdscript_vm.cpp
@@ -1653,7 +1653,7 @@ Variant GDScriptFunction::call(GDScriptInstance *p_instance, const Variant **p_a
VariantInternal::initialize(ret, Variant::OBJECT);
Object **ret_opaque = VariantInternal::get_object(ret);
method->ptrcall(base_obj, argptrs, ret_opaque);
- VariantInternal::set_object(ret, *ret_opaque);
+ VariantInternal::object_assign(ret, *ret_opaque); // Set so ID is correct too.
#ifdef DEBUG_ENABLED
if (GDScriptLanguage::get_singleton()->profiling) {