diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs index 93a83b701b73..0cc89d78af30 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 @@ public static godot_callable ConvertCallableToNative(in Callable p_managed_calla } return new godot_callable(method /* Takes ownership of disposable */, - p_managed_callable.Target.GetInstanceId()); + p_managed_callable.Target?.GetInstanceId() ?? 0); } }