mirror of
https://git.ryujinx.app/projects/Kenji-NX.git
synced 2026-09-27 12:37:54 +02:00
misc: chore: Fix numerous NullReferenceExceptions, InvalidOperationExceptions
This commit is contained in:
@@ -67,7 +67,8 @@ namespace Ryujinx.Graphics.Gpu.Image
|
||||
public T FindOrCreate(GpuChannel channel, ulong address, int maximumId, TextureBindingsArrayCache bindingsArrayCache)
|
||||
{
|
||||
// Remove old entries from the cache, if possible.
|
||||
while (_pools.Count > MaxCapacity && (_currentTimestamp - _pools.First.Value.CacheTimestamp) >= MinDeltaForRemoval)
|
||||
while (_pools.Count > MaxCapacity && _pools.First != null &&
|
||||
(_currentTimestamp - _pools.First.Value.CacheTimestamp) >= MinDeltaForRemoval)
|
||||
{
|
||||
T oldestPool = _pools.First.Value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user