From 5a44403cf0bf3c2bc1f84abd3ca4467c424a9278 Mon Sep 17 00:00:00 2001 From: Vitaliy Date: Thu, 24 Dec 2020 22:20:57 +0300 Subject: [PATCH] Add check for appIDs after intersection (#2099) --- ArchiSteamFarm/Bot.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ArchiSteamFarm/Bot.cs b/ArchiSteamFarm/Bot.cs index cae268a00..baa1ca291 100755 --- a/ArchiSteamFarm/Bot.cs +++ b/ArchiSteamFarm/Bot.cs @@ -3194,6 +3194,11 @@ namespace ArchiSteamFarm { Dictionary<(uint RealAppID, Steam.Asset.EType Type, Steam.Asset.ERarity Rarity), List> inventorySets = Trading.GetInventorySets(inventory); appIDs.IntersectWith(inventorySets.Where(kv => kv.Value.Count >= MinimumCardsPerBadge).Select(kv => kv.Key.RealAppID)); + + if (appIDs.Count == 0) { + return; + } + Dictionary? cardCountPerAppID = await LoadCardsPerSet(appIDs).ConfigureAwait(false); if ((cardCountPerAppID == null) || (cardCountPerAppID.Count == 0)) {