diff --git a/src/GenshinSwitch.Fetch/Regedit/GenshinRegedit.cs b/src/GenshinSwitch.Fetch/Regedit/GenshinRegedit.cs index 0b78256..0baa95c 100644 --- a/src/GenshinSwitch.Fetch/Regedit/GenshinRegedit.cs +++ b/src/GenshinSwitch.Fetch/Regedit/GenshinRegedit.cs @@ -75,7 +75,14 @@ internal static string GetStringFromRegedit(string key, GameType type = GameType { if (MainService.ServiceEnabled) { - return MainService.GetGameAccountRegisty(key, type); + try + { + return MainService.GetGameAccountRegisty(key, type); + } + catch + { + return null!; + } } #if DISPSREG @@ -126,7 +133,13 @@ internal static void SetStringToRegedit(string key, string value, GameType type { if (MainService.ServiceEnabled) { - MainService.SetGameAccountRegisty(key, value, type); + try + { + MainService.SetGameAccountRegisty(key, value, type); + } + catch + { + } return; }