Check for null during cache clean (#153)

This commit is contained in:
Michael Green
2023-10-10 22:02:34 -07:00
committed by GitHub
parent 308338580d
commit de628e6766

View File

@@ -421,6 +421,10 @@ namespace gaseous_server.Classes.Metadata
private static void CacheClean()
{
if (ObjectCache == null)
{
ObjectCache = new Dictionary<string, MemoryCacheObject>();
}
Dictionary<string, MemoryCacheObject> workCache = ObjectCache;
foreach (KeyValuePair<string, MemoryCacheObject> objectCache in workCache)
{