diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index f77ccca0009..9da68c490f4 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -563,7 +563,7 @@ Vector CSharpLanguage::debug_get_current_stack_info() _TLS_RECURSION_GUARD_V_(Vector()); GD_MONO_SCOPE_THREAD_ATTACH; - if (!gdmono->is_runtime_initialized() || !GDMono::get_singleton()->get_core_api_assembly() || !GDMonoCache::cached_data.corlib_cache_updated) + if (!gdmono || !gdmono->is_runtime_initialized() || !GDMono::get_singleton()->get_core_api_assembly() || !GDMonoCache::cached_data.corlib_cache_updated) return Vector(); MonoObject *stack_trace = mono_object_new(mono_domain_get(), CACHED_CLASS(System_Diagnostics_StackTrace)->get_mono_ptr()); @@ -716,7 +716,7 @@ void CSharpLanguage::reload_tool_script(const Ref