From 821f6ce617ab5e7331cdeac35baa0784010a79f5 Mon Sep 17 00:00:00 2001 From: laolarou Date: Thu, 25 Jan 2024 18:01:56 -0800 Subject: [PATCH] Update DefaultLauncherAccountParser.cs --- .../DefaultComponent/Launch/DefaultLauncherAccountParser.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ProjBobcat/ProjBobcat/DefaultComponent/Launch/DefaultLauncherAccountParser.cs b/ProjBobcat/ProjBobcat/DefaultComponent/Launch/DefaultLauncherAccountParser.cs index 9994646..7d9e8bb 100644 --- a/ProjBobcat/ProjBobcat/DefaultComponent/Launch/DefaultLauncherAccountParser.cs +++ b/ProjBobcat/ProjBobcat/DefaultComponent/Launch/DefaultLauncherAccountParser.cs @@ -143,10 +143,13 @@ public bool AddNewAccount(string uuid, AccountModel account, out Guid? id) public bool RemoveAccount(Guid id) { var result = Find(id); + if (!result.HasValue) return false; var (key, _) = result.Value; + if (string.IsNullOrEmpty(key)) return false; + LauncherAccount?.Accounts?.Remove(key); Save();