Make IPC work with nullable types and null values. (#1765)

This commit is contained in:
Ottermandias 2024-04-11 23:19:19 +02:00 committed by GitHub
parent de6dcb8b53
commit e075a26ff7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -166,7 +166,12 @@ internal class CallGateChannel
if (arg == null) if (arg == null)
{ {
if (paramType.IsValueType) if (paramType.IsValueType)
{
if (paramType.IsGenericType && paramType.GetGenericTypeDefinition() == typeof(Nullable<>))
continue;
throw new IpcValueNullError(this.Name, paramType, i); throw new IpcValueNullError(this.Name, paramType, i);
}
continue; continue;
} }