Avoid null refs

This commit is contained in:
Cinder
2021-12-09 11:59:30 -06:00
parent e0e2267838
commit eec209d8b8
10 changed files with 68 additions and 64 deletions

View File

@@ -163,7 +163,7 @@ namespace VoiceTest
catch(Exception e)
{
Console.WriteLine(e.Message);
if (e is VoiceException exception && exception.LoggedIn)
if (e is VoiceException { LoggedIn: true } exception)
{
client.Network.Logout();
}