mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 12:12:28 +00:00
Adding null check to prevent null reference exception when serializing delegates in C#
This commit is contained in:
parent
28f642097a
commit
5f47873f10
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user