From 03c3a5f4eff2470abfb0f9edbc50f3c714988621 Mon Sep 17 00:00:00 2001 From: CWX Date: Thu, 10 Apr 2025 12:37:36 +0100 Subject: [PATCH] try catch an error --- Libraries/SPTarkov.Server.Core/Helpers/BotHelper.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Libraries/SPTarkov.Server.Core/Helpers/BotHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/BotHelper.cs index c68879e6..b93f8eb9 100644 --- a/Libraries/SPTarkov.Server.Core/Helpers/BotHelper.cs +++ b/Libraries/SPTarkov.Server.Core/Helpers/BotHelper.cs @@ -214,7 +214,15 @@ public class BotHelper( } // TODO: this keeps randomly null refing with nothing being null, plz fix smart person - _pmcNameCache.TryAdd(cacheKey, matchingNames); + try + { + _pmcNameCache.TryAdd(cacheKey, matchingNames); + } + catch (Exception e) + { + _logger.Debug($"this keeps randomly null refing with nothing being null, plz fix smart person"); + _logger.Debug(e.ToString()); + } eligibleNames = matchingNames; }