mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-29 05:23:01 +00:00
Fix NRE when MemoryUnmappedHandler is called for a destroyed channel (#4285)
This commit is contained in:
parent
070136b3f7
commit
cd3a15aea5
1 changed files with 4 additions and 2 deletions
|
@ -73,7 +73,7 @@ namespace Ryujinx.Graphics.Gpu
|
||||||
|
|
||||||
// Since the memory manager changed, make sure we will get pools from addresses of the new memory manager.
|
// Since the memory manager changed, make sure we will get pools from addresses of the new memory manager.
|
||||||
TextureManager.ReloadPools();
|
TextureManager.ReloadPools();
|
||||||
MemoryManager.Physical.BufferCache.QueuePrune();
|
memoryManager.Physical.BufferCache.QueuePrune();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -84,7 +84,9 @@ namespace Ryujinx.Graphics.Gpu
|
||||||
private void MemoryUnmappedHandler(object sender, UnmapEventArgs e)
|
private void MemoryUnmappedHandler(object sender, UnmapEventArgs e)
|
||||||
{
|
{
|
||||||
TextureManager.ReloadPools();
|
TextureManager.ReloadPools();
|
||||||
MemoryManager.Physical.BufferCache.QueuePrune();
|
|
||||||
|
var memoryManager = Volatile.Read(ref _memoryManager);
|
||||||
|
memoryManager?.Physical.BufferCache.QueuePrune();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in a new issue