From d525a45e5c0a596ef96c6ce650bf391b2d5f3bb4 Mon Sep 17 00:00:00 2001 From: Raul Santos Date: Sun, 15 Oct 2023 02:02:58 +0200 Subject: [PATCH] C#: Fix converting default Callables to native --- .../glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs index 93a83b701b7..0cc89d78af3 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs @@ -259,7 +259,7 @@ namespace Godot.NativeInterop } return new godot_callable(method /* Takes ownership of disposable */, - p_managed_callable.Target.GetInstanceId()); + p_managed_callable.Target?.GetInstanceId() ?? 0); } }