From 4d960efafc64f0f94f68158ca49ed7f3dd9742dc Mon Sep 17 00:00:00 2001 From: George Marques Date: Wed, 19 Feb 2020 09:15:16 -0300 Subject: GDScript: Remove self static reference and create one on calls This is needed because of the new changes to Variant. The reference counter is increased by adding it to a Variant, which means no GDScript will be freed (or will be double freed if manually freed somewhere). --- modules/gdscript/gdscript_function.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/gdscript/gdscript_function.h') diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h index 7b7bcbaac9..2c432360ba 100644 --- a/modules/gdscript/gdscript_function.h +++ b/modules/gdscript/gdscript_function.h @@ -265,7 +265,7 @@ private: List stack_debug; - _FORCE_INLINE_ Variant *_get_variant(int p_address, GDScriptInstance *p_instance, GDScript *p_script, Variant &self, Variant *p_stack, String &r_error) const; + _FORCE_INLINE_ Variant *_get_variant(int p_address, GDScriptInstance *p_instance, GDScript *p_script, Variant &self, Variant &static_ref, Variant *p_stack, String &r_error) const; _FORCE_INLINE_ String _get_call_error(const Variant::CallError &p_err, const String &p_where, const Variant **argptrs) const; friend class GDScriptLanguage; -- cgit v1.2.3