Skip to content

Commit

Permalink
Merge pull request #114 from Corona-Studio/hotfix
Browse files Browse the repository at this point in the history
Bugfix: Fix NRE in DefaultLauncherAccountParser.cs
  • Loading branch information
laolarou726 authored Jan 26, 2024
2 parents 16d6c5b + 821f6ce commit 4a1422d
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 4a1422d

Please sign in to comment.