From fa14b6d21205bb56d1c60aa77020e3343eef9f62 Mon Sep 17 00:00:00 2001 From: RedworkDE <10944644+RedworkDE@users.noreply.github.com> Date: Tue, 23 May 2023 00:00:32 +0200 Subject: [PATCH] C#: Fix `SendToScriptDebugger` crash --- .../GodotSharp/Core/NativeInterop/ExceptionUtils.cs | 4 ++-- .../GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs index 71a2adadcb4..2d8067d3006 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/ExceptionUtils.cs @@ -103,7 +103,7 @@ namespace Godot.NativeInterop { try { - if (NativeFuncs.godotsharp_internal_script_debugger_is_active()) + if (NativeFuncs.godotsharp_internal_script_debugger_is_active().ToBool()) { SendToScriptDebugger(e); } @@ -122,7 +122,7 @@ namespace Godot.NativeInterop { try { - if (NativeFuncs.godotsharp_internal_script_debugger_is_active()) + if (NativeFuncs.godotsharp_internal_script_debugger_is_active().ToBool()) { SendToScriptDebugger(e); } diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs index 3d72ee00366..fc2ceed479e 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/NativeFuncs.cs @@ -56,7 +56,7 @@ namespace Godot.NativeInterop in godot_string p_file, int p_line, in godot_string p_err, in godot_string p_descr, godot_bool p_warning, in DebuggingUtils.godot_stack_info_vector p_stack_info_vector); - internal static partial bool godotsharp_internal_script_debugger_is_active(); + internal static partial godot_bool godotsharp_internal_script_debugger_is_active(); internal static partial IntPtr godotsharp_internal_object_get_associated_gchandle(IntPtr ptr);