Guribo opened this issue 4 years ago · 2 comments
When trying to get a player by an invalid ID e.g. -1 it throws an exception instead of returning null.
Issue:
CyanEmu/CyanEmu/Scripts/CyanEmuPlayerManager.cs
Line 112 in 6b959f5
Solution:
public static VRCPlayerApi GetPlayerByID(int playerID) { return players.TryGetValue(playerID, out var player) ? player : null; }
Thank you for reporting this. I have implemented a fix in da7b431.
Thanks!