Don't crash if a null config is passed to the constructor

This commit is contained in:
RogueException
2015-10-06 20:57:47 -03:00
parent 44d16f73e4
commit c43f0d63e1

View File

@@ -55,7 +55,7 @@ namespace Discord
_config = config ?? new DiscordClientConfig();
_config.Lock();
_enableVoice = config.VoiceMode != DiscordVoiceMode.Disabled && !config.EnableVoiceMultiserver;
_enableVoice = _config.VoiceMode != DiscordVoiceMode.Disabled && !_config.EnableVoiceMultiserver;
_state = (int)DiscordClientState.Disconnected;
_cancelToken = new CancellationToken(true);