From ec7297e99c80a3c00241c56b627c5436c58c7c7b Mon Sep 17 00:00:00 2001 From: Voltana Date: Sat, 14 May 2016 21:05:36 -0300 Subject: [PATCH] Dont exception on SetGame if no url is passed --- src/Discord.Net/DiscordClient.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Discord.Net/DiscordClient.cs b/src/Discord.Net/DiscordClient.cs index 3b986c7c8..47e85ae2a 100644 --- a/src/Discord.Net/DiscordClient.cs +++ b/src/Discord.Net/DiscordClient.cs @@ -321,11 +321,11 @@ namespace Discord CurrentGame = game; SendStatus(); } - public void SetGame(string game, string url = null, GameType type = 0) + public void SetGame(string game, string url = null, GameType type = GameType.Default) { CurrentGame = new GameInfo() { Name = game, - Url = url ?? CurrentGame.Url, + Url = url ?? CurrentGame?.Url, Type = type }; SendStatus();