summaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorRaul Santos <raulsntos@gmail.com>2023-10-15 02:02:58 +0200
committerRaul Santos <raulsntos@gmail.com>2023-10-15 02:02:58 +0200
commitd525a45e5c0a596ef96c6ce650bf391b2d5f3bb4 (patch)
tree3264d2c2a68e6c21a32d4613cd9b738011a6ff5d /modules
parenta574c0296b38d5f786f249b12e6251e562c528cc (diff)
downloadredot-engine-d525a45e5c0a596ef96c6ce650bf391b2d5f3bb4.tar.gz
C#: Fix converting default Callables to native
Diffstat (limited to 'modules')
-rw-r--r--modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs
index 93a83b701b..0cc89d78af 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);
}
}