diff --git a/Ryujinx.Graphics.Gpu/GpuChannel.cs b/Ryujinx.Graphics.Gpu/GpuChannel.cs index fe858762..43fa8484 100644 --- a/Ryujinx.Graphics.Gpu/GpuChannel.cs +++ b/Ryujinx.Graphics.Gpu/GpuChannel.cs @@ -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. TextureManager.ReloadPools(); - MemoryManager.Physical.BufferCache.QueuePrune(); + memoryManager.Physical.BufferCache.QueuePrune(); } /// @@ -84,7 +84,9 @@ namespace Ryujinx.Graphics.Gpu private void MemoryUnmappedHandler(object sender, UnmapEventArgs e) { TextureManager.ReloadPools(); - MemoryManager.Physical.BufferCache.QueuePrune(); + + var memoryManager = Volatile.Read(ref _memoryManager); + memoryManager?.Physical.BufferCache.QueuePrune(); } ///