diff options
author | Ignacio Etcheverry <neikeq@users.noreply.github.com> | 2018-12-01 02:38:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-01 02:38:58 +0100 |
commit | ca28c455bfdc8408485c217c17f07011c0b43f64 (patch) | |
tree | 3dfa908fbaf0a3a1b9a3b6be101dd6a77d8160c1 /modules/mono/csharp_script.h | |
parent | b613c29053ef30a6be184aed6b9be5df46443db6 (diff) | |
parent | f6f2be7577f0f952c446064252339b7142109ea7 (diff) |
Merge pull request #24098 from neikeq/kk
Fix crash due to ~CSharpInstance() being called on freed instance
Diffstat (limited to 'modules/mono/csharp_script.h')
-rw-r--r-- | modules/mono/csharp_script.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/mono/csharp_script.h b/modules/mono/csharp_script.h index 269d7ebe42..501e0d9d6d 100644 --- a/modules/mono/csharp_script.h +++ b/modules/mono/csharp_script.h @@ -198,6 +198,7 @@ class CSharpInstance : public ScriptInstance { bool ref_dying; bool unsafe_referenced; bool predelete_notified; + bool destructing_script_instance; Ref<CSharpScript> script; Ref<MonoGCHandle> gchandle; @@ -218,6 +219,8 @@ class CSharpInstance : public ScriptInstance { public: MonoObject *get_mono_object() const; + _FORCE_INLINE_ bool is_destructing_script_instance() { return destructing_script_instance; } + virtual bool set(const StringName &p_name, const Variant &p_value); virtual bool get(const StringName &p_name, Variant &r_ret) const; virtual void get_property_list(List<PropertyInfo> *p_properties) const; |