From e075a26ff784b2262088d87ce7bfcf121a107844 Mon Sep 17 00:00:00 2001 From: Ottermandias <70807659+Ottermandias@users.noreply.github.com> Date: Thu, 11 Apr 2024 23:19:19 +0200 Subject: [PATCH] Make IPC work with nullable types and null values. (#1765) --- Dalamud/Plugin/Ipc/Internal/CallGateChannel.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dalamud/Plugin/Ipc/Internal/CallGateChannel.cs b/Dalamud/Plugin/Ipc/Internal/CallGateChannel.cs index 54adf2163..ead4d8df9 100644 --- a/Dalamud/Plugin/Ipc/Internal/CallGateChannel.cs +++ b/Dalamud/Plugin/Ipc/Internal/CallGateChannel.cs @@ -166,7 +166,12 @@ internal class CallGateChannel if (arg == null) { if (paramType.IsValueType) + { + if (paramType.IsGenericType && paramType.GetGenericTypeDefinition() == typeof(Nullable<>)) + continue; + throw new IpcValueNullError(this.Name, paramType, i); + } continue; }