Browse Source

Attempt to patch the GameParty nullref

Not sure if this works, needs a more proper solution in the future
anyways
tags/2.0.0-beta
Christopher F 7 years ago
parent
commit
5ce85deb9d
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      src/Discord.Net.WebSocket/Extensions/EntityExtensions.cs

+ 2
- 0
src/Discord.Net.WebSocket/Extensions/EntityExtensions.cs View File

@@ -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)


Loading…
Cancel
Save