From c0ebc281360c7df1acae4b0510d8310573491acc 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: [PATCH] C#: Fix crash when errors occur before language initialization. --- modules/mono/csharp_script.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/mono/csharp_script.cpp b/modules/mono/csharp_script.cpp index 872e803b9ca..d3c24157558 100644 --- a/modules/mono/csharp_script.cpp +++ b/modules/mono/csharp_script.cpp @@ -589,7 +589,7 @@ Vector CSharpLanguage::debug_get_current_stack_info() _recursion_flag_ = false; }; - if (!gdmono->is_runtime_initialized()) { + if (!gdmono || !gdmono->is_runtime_initialized()) { return Vector(); } @@ -679,6 +679,7 @@ void CSharpLanguage::reload_tool_script(const Ref