diff options
| author | Pieter-Jan Briers | 2018-05-11 13:50:56 +0200 |
|---|---|---|
| committer | Pieter-Jan Briers | 2018-05-11 13:50:56 +0200 |
| commit | 27d70924a00ef2e199426d3facd8fa5dd7151bb5 (patch) | |
| tree | 18684abd4e83b2fcd33750604c8bc282e0bbea55 /modules | |
| parent | 74796d9b6cf1663029a5fa6b5024b236746e506a (diff) | |
| download | godot-27d70924a00ef2e199426d3facd8fa5dd7151bb5.tar.gz godot-27d70924a00ef2e199426d3facd8fa5dd7151bb5.tar.zst godot-27d70924a00ef2e199426d3facd8fa5dd7151bb5.zip | |
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/mono/csharp_script.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index bbe245951..75249fe47 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -1726,6 +1726,12 @@ void CSharpScript::_clear() { Variant CSharpScript::call(const StringName &p_method, const Variant **p_args, int p_argcount, Variant::CallError &r_error) { + if (unlikely(GDMono::get_singleton() == NULL)) { + // Probably not the best error but eh. + r_error.error = Variant::CallError::CALL_ERROR_INSTANCE_IS_NULL; + return Variant(); + } + GDMonoClass *top = script_class; while (top && top != native) { |
