misc: chore: Fix possible NullReferenceExceptions, suppress warnings

This commit is contained in:
KeatonTheBot
2025-12-13 13:32:49 -06:00
parent 9920619ff6
commit c70f692324
29 changed files with 100 additions and 80 deletions
@@ -1061,17 +1061,17 @@ namespace Ryujinx.Graphics.Gpu.Image
}
}
if (entry.CacheNode != null)
if (entry?.CacheNode != null)
{
_lruCache.Remove(entry.CacheNode);
_lruCache.AddLast(entry.CacheNode);
}
else
{
entry.CacheNode = _lruCache.AddLast(entry);
entry?.CacheNode = _lruCache.AddLast(entry);
}
entry.CacheTimestamp = ++_currentTimestamp;
entry?.CacheTimestamp = ++_currentTimestamp;
RemoveLeastUsedEntries();