diff --git a/Core/Net/NetFileCache.cs b/Core/Net/NetFileCache.cs index c49ced10d2..2545779281 100644 --- a/Core/Net/NetFileCache.cs +++ b/Core/Net/NetFileCache.cs @@ -295,7 +295,11 @@ public void EnforceSizeLimit(long bytes, Registry registry) KspVersionCriteria aggregateCriteria = manager?.Instances.Values .Where(ksp => ksp.Valid) .Select(ksp => ksp.VersionCriteria()) - .Aggregate((a, b) => a.Union(b)); + .Aggregate( + manager?.CurrentInstance?.VersionCriteria() + ?? new KspVersionCriteria(null), + (combinedCrit, nextCrit) => combinedCrit.Union(nextCrit) + ); // This object lets us find the modules associated with a cached file Dictionary> hashMap = registry.GetDownloadHashIndex();