fix: bug - null reference for hidden accounts

This commit is contained in:
Mikhail Shabanov committed 2022-08-19 17:09:22 +02:00
1 parent bb16617f3f
commit 7d524fcdcd
7 files changed
+28 -38

No files matched your search

@@ -54,7 +54,7 @@ namespace WotBlitzStatisticsPro.Logic
for (int i = 0; i < accounts.Count; i++)
{
var accountResponse = accounts.ToArray()[i];
var shortAccountInfo = shortAccountInfos?.FirstOrDefault(a => a.AccountId == accountResponse.AccountId);
var shortAccountInfo = shortAccountInfos?.FirstOrDefault(a => a != null && a.AccountId == accountResponse.AccountId);
if (shortAccountInfo != null)
{
_mapper.Map(shortAccountInfo, accountResponse);