diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-13 09:05:22 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-13 09:05:22 +0200 |
commit | b9e924c806870d1c9dc8705d5af9230504e737da (patch) | |
tree | 90b507d589a21fd6f1fbc0630f926c9d5b4df804 /modules/mono | |
parent | f2bd389e210a3dd1b8384f42c2ce8c22fa8a88f3 (diff) | |
parent | 5f47873f1064defc0f2c3ad7163812a19f58d707 (diff) |
Merge pull request #67216 from dotlogix/Bugfix/FixErrorWhenSerializingSignals
Fix crash when serializing empty delegates in C#
Diffstat (limited to 'modules/mono')
-rw-r--r-- | modules/mono/glue/GodotSharp/GodotSharp/Core/DelegateUtils.cs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/mono/glue/GodotSharp/GodotSharp/Core/DelegateUtils.cs b/modules/mono/glue/GodotSharp/GodotSharp/Core/DelegateUtils.cs index 3c75d18943..9b3969d453 100644 --- a/modules/mono/glue/GodotSharp/GodotSharp/Core/DelegateUtils.cs +++ b/modules/mono/glue/GodotSharp/GodotSharp/Core/DelegateUtils.cs @@ -76,6 +76,11 @@ namespace Godot internal static bool TrySerializeDelegate(Delegate @delegate, Collections.Array serializedData) { + if (@delegate is null) + { + return false; + } + if (@delegate is MulticastDelegate multicastDelegate) { bool someDelegatesSerialized = false; |