From dd59302bb34888dd49a546028d1d131e29c254a3 Mon Sep 17 00:00:00 2001 From: DismissedLight <1686188646@qq.com> Date: Wed, 3 Jan 2024 20:40:37 +0800 Subject: [PATCH] fix bilibili server crash --- .../Service/Game/Account/GameAccountService.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Snap.Hutao/Snap.Hutao/Service/Game/Account/GameAccountService.cs b/src/Snap.Hutao/Snap.Hutao/Service/Game/Account/GameAccountService.cs index 5c6fd327..ff08a1a0 100644 --- a/src/Snap.Hutao/Snap.Hutao/Service/Game/Account/GameAccountService.cs +++ b/src/Snap.Hutao/Snap.Hutao/Service/Game/Account/GameAccountService.cs @@ -29,6 +29,11 @@ internal sealed partial class GameAccountService : IGameAccountService { ArgumentNullException.ThrowIfNull(gameAccounts); + if (schemeType is SchemeType.ChineseBilibili) + { + return default; + } + string? registrySdk = RegistryInterop.Get(schemeType); if (string.IsNullOrEmpty(registrySdk)) { @@ -62,6 +67,11 @@ internal sealed partial class GameAccountService : IGameAccountService { ArgumentNullException.ThrowIfNull(gameAccounts); + if (schemeType is SchemeType.ChineseBilibili) + { + return default; + } + string? registrySdk = RegistryInterop.Get(schemeType); if (string.IsNullOrEmpty(registrySdk))