summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2018-06-05 10:03:11 +0200
committerGitHub <noreply@github.com>2018-06-05 10:03:11 +0200
commit6e32a2886f6d816c1e7e1921d64ad931a0cfa20e (patch)
treeb14e15cbd7cdd63d13add63233e77e1b7514bfe9
parent7488e839541384da0ed8985872ac3b936ec5e27d (diff)
parent27d70924a00ef2e199426d3facd8fa5dd7151bb5 (diff)
Merge pull request #18792 from PJB3005/18-05-11-objectdb-verbose-mono
Fixes ObjectDB leak printout with mono.
-rw-r--r--modules/mono/csharp_script.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp
index 3cfc376317..46c40b2690 100644
--- a/modules/mono/csharp_script.cpp
+++ b/modules/mono/csharp_script.cpp
@@ -1732,6 +1732,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) {