diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-11-10 21:55:22 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-11-10 21:55:22 +0100 |
commit | 313bffc205a900a209f0f583e67bad657bf72bca (patch) | |
tree | 0f69a77b0c2d930c42eee4ea91dc402c7afc932b | |
parent | 76d9521801b2b6ab49386d99efc19325aa2aa543 (diff) | |
parent | d525a45e5c0a596ef96c6ce650bf391b2d5f3bb4 (diff) | |
download | redot-engine-313bffc205a900a209f0f583e67bad657bf72bca.tar.gz |
Merge pull request #83357 from raulsntos/dotnet/ConvertCallableToNative(default)
C#: Fix converting default Callables to native
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/NativeInterop/Marshaling.cs | 2 |
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); } } |