diff --git a/src/DiIiS-NA/BGS-Server/AccountsSystem/AccountManager.cs b/src/DiIiS-NA/BGS-Server/AccountsSystem/AccountManager.cs index 0f132f4..b841007 100644 --- a/src/DiIiS-NA/BGS-Server/AccountsSystem/AccountManager.cs +++ b/src/DiIiS-NA/BGS-Server/AccountsSystem/AccountManager.cs @@ -206,8 +206,13 @@ namespace DiIiS_NA.LoginServer.AccountsSystem public static Account GetAccountByDBAccount(DBAccount dbAccount) { + if (dbAccount == null) + return null; if (LoadedAccounts.ContainsKey(dbAccount.Id)) + { + LoadedAccounts[dbAccount.Id].DBAccount = dbAccount; return LoadedAccounts[dbAccount.Id]; + } else { var account = new Account(dbAccount); diff --git a/src/DiIiS-NA/BGS-Server/AccountsSystem/GameAccountManager.cs b/src/DiIiS-NA/BGS-Server/AccountsSystem/GameAccountManager.cs index 7a4a30d..d6681ff 100644 --- a/src/DiIiS-NA/BGS-Server/AccountsSystem/GameAccountManager.cs +++ b/src/DiIiS-NA/BGS-Server/AccountsSystem/GameAccountManager.cs @@ -40,8 +40,13 @@ namespace DiIiS_NA.LoginServer.AccountsSystem public static GameAccount GetGameAccountByDBGameAccount(DBGameAccount dbGameAccount) { + if (dbGameAccount == null) + return null; if (LoadedGameAccounts.ContainsKey(dbGameAccount.Id)) + { + LoadedGameAccounts[dbGameAccount.Id].DBGameAccount = dbGameAccount; return LoadedGameAccounts[dbGameAccount.Id]; + } else { var account = new GameAccount(dbGameAccount);