mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-17 16:37:04 +00:00
misc: chore: Fix numerous NullReferenceExceptions, InvalidOperationExceptions
This commit is contained in:
parent
9b6b9146e2
commit
d0abbc6da3
90 changed files with 667 additions and 533 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue