From 0112862e70819f700fd86104a136795fcbe1c80e Mon Sep 17 00:00:00 2001 From: RedworkDE <10944644+RedworkDE@users.noreply.github.com> Date: Tue, 28 Feb 2023 22:08:19 +0100 Subject: C#: Fix crash when errors occur before language initialization. (cherry picked from commit c0ebc281360c7df1acae4b0510d8310573491acc) --- modules/mono/csharp_script.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/mono') diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 9159f308a2..aad8ab9a57 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -581,7 +581,7 @@ Vector CSharpLanguage::debug_get_current_stack_info() _recursion_flag_ = false; }; - if (!gdmono->is_runtime_initialized()) { + if (!gdmono || !gdmono->is_runtime_initialized()) { return Vector(); } @@ -671,6 +671,7 @@ void CSharpLanguage::reload_tool_script(const Ref