From 5ce85deb9db694de28333bd3b5655be1638bcddd Mon Sep 17 00:00:00 2001 From: Christopher F Date: Wed, 27 Dec 2017 14:47:55 -0500 Subject: [PATCH] Attempt to patch the GameParty nullref Not sure if this works, needs a more proper solution in the future anyways --- src/Discord.Net.WebSocket/Extensions/EntityExtensions.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Discord.Net.WebSocket/Extensions/EntityExtensions.cs b/src/Discord.Net.WebSocket/Extensions/EntityExtensions.cs index 4aff13753..b59702be2 100644 --- a/src/Discord.Net.WebSocket/Extensions/EntityExtensions.cs +++ b/src/Discord.Net.WebSocket/Extensions/EntityExtensions.cs @@ -56,6 +56,8 @@ public static GameParty ToEntity(this API.GameParty model) { + // todo: proper fix for this + if (model == null) return null; // Discord will probably send bad data since they don't validate anything int current = 0, cap = 0; if (model.Size.Length == 2)