diff options
| author | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2018-12-01 02:23:55 +0100 |
|---|---|---|
| committer | Ignacio Etcheverry <ignalfonsore@gmail.com> | 2018-12-01 02:28:24 +0100 |
| commit | f6f2be7577f0f952c446064252339b7142109ea7 (patch) | |
| tree | 3dfa908fbaf0a3a1b9a3b6be101dd6a77d8160c1 /modules/mono/csharp_script.h | |
| parent | b613c29053ef30a6be184aed6b9be5df46443db6 (diff) | |
| download | redot-engine-f6f2be7577f0f952c446064252339b7142109ea7.tar.gz | |
Fix crash due to ~CSharpInstance() being called on freed instance
This would be the case when calling SetScript on an object with a C# script.
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; |
