From 3750e307e64880cd0d292b9b23b33c965ff1905e Mon Sep 17 00:00:00 2001 From: defnotken Date: Thu, 11 Sep 2025 23:37:24 -0500 Subject: [PATCH] Cache null reference potential fix. --- LightlessSync/FileCache/CacheMonitor.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/LightlessSync/FileCache/CacheMonitor.cs b/LightlessSync/FileCache/CacheMonitor.cs index d310851..facc770 100644 --- a/LightlessSync/FileCache/CacheMonitor.cs +++ b/LightlessSync/FileCache/CacheMonitor.cs @@ -647,6 +647,12 @@ public sealed class CacheMonitor : DisposableMediatorSubscriberBase CancellationToken = ct }, (cachePath) => { + if (_fileDbManager == null || _ipcManager?.Penumbra == null || cachePath == null) + { + Logger.LogTrace("Potential null in db: {isDbNull} penumbra: {isPenumbraNull} cachepath: {isPathNull}", _fileDbManager == null, _ipcManager?.Penumbra == null, cachePath == null); + return; + } + if (ct.IsCancellationRequested) return; if (!_ipcManager.Penumbra.APIAvailable)