1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-05 12:10:55 +00:00

Fixes ObjectDB leak printout with mono.

Fixes #18767
This commit is contained in:
Pieter-Jan Briers
2018-05-11 13:50:56 +02:00
parent 74796d9b6c
commit 27d70924a0

View File

@@ -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) { 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; GDMonoClass *top = script_class;
while (top && top != native) { while (top && top != native) {