Avoid null refs
This commit is contained in:
@@ -174,7 +174,7 @@ namespace GridProxy
|
||||
if (values.Contains("inventory-root"))
|
||||
{
|
||||
inventoryRoot = new UUID(
|
||||
(string)((System.Collections.Hashtable)(((System.Collections.ArrayList)values["inventory-root"])[0]))["folder_id"]
|
||||
(string)((System.Collections.Hashtable)(((System.Collections.ArrayList)values["inventory-root"])[0]))?["folder_id"]
|
||||
);
|
||||
if (logLogin)
|
||||
{
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user