From b16a459ab8bc724e9b2f8430da80df39f62e79bb Mon Sep 17 00:00:00 2001 From: Archi Date: Tue, 5 Dec 2023 01:53:14 +0100 Subject: [PATCH] Misc --- .../SteamTokenDumperPlugin.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs index 49085287a..1535db3ee 100644 --- a/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs +++ b/ArchiSteamFarm.OfficialPlugins.SteamTokenDumper/SteamTokenDumperPlugin.cs @@ -211,6 +211,11 @@ internal sealed class SteamTokenDumperPlugin : OfficialPlugin, IASF, IBot, IBotC public async Task OnBotInit(Bot bot) { ArgumentNullException.ThrowIfNull(bot); + if (GlobalCache == null) { + // We can't operate like this anyway, skip initialization of synchronization structures + return; + } + SemaphoreSlim refreshSemaphore = new(1, 1); Timer refreshTimer = new(OnBotRefreshTimer, bot, Timeout.InfiniteTimeSpan, Timeout.InfiniteTimeSpan);