diff options
author | Liam <byteslice@airmail.cc> | 2024-02-13 02:02:53 +0100 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2024-02-13 02:02:59 +0100 |
commit | 461eaca7e83e45a311a1d92a2de6d6a54b2405ab (patch) | |
tree | ac8971f2ec89d1f1979901533ed041e4ae98cf80 /src/core/device_memory_manager.inc | |
parent | Merge pull request #12756 from liamwhite/applet-multiprocess-hwc (diff) | |
download | yuzu-461eaca7e83e45a311a1d92a2de6d6a54b2405ab.tar yuzu-461eaca7e83e45a311a1d92a2de6d6a54b2405ab.tar.gz yuzu-461eaca7e83e45a311a1d92a2de6d6a54b2405ab.tar.bz2 yuzu-461eaca7e83e45a311a1d92a2de6d6a54b2405ab.tar.lz yuzu-461eaca7e83e45a311a1d92a2de6d6a54b2405ab.tar.xz yuzu-461eaca7e83e45a311a1d92a2de6d6a54b2405ab.tar.zst yuzu-461eaca7e83e45a311a1d92a2de6d6a54b2405ab.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/device_memory_manager.inc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/device_memory_manager.inc b/src/core/device_memory_manager.inc index 6dfee806c..d636621de 100644 --- a/src/core/device_memory_manager.inc +++ b/src/core/device_memory_manager.inc @@ -522,13 +522,17 @@ void DeviceMemoryManager<Traits>::UpdatePagesCachedCount(DAddr addr, size_t size auto* memory_device_inter = registered_processes[asid.id]; const auto release_pending = [&] { if (uncache_bytes > 0) { - MarkRegionCaching(memory_device_inter, uncache_begin << Memory::YUZU_PAGEBITS, - uncache_bytes, false); + if (memory_device_inter != nullptr) { + MarkRegionCaching(memory_device_inter, uncache_begin << Memory::YUZU_PAGEBITS, + uncache_bytes, false); + } uncache_bytes = 0; } if (cache_bytes > 0) { - MarkRegionCaching(memory_device_inter, cache_begin << Memory::YUZU_PAGEBITS, - cache_bytes, true); + if (memory_device_inter != nullptr) { + MarkRegionCaching(memory_device_inter, cache_begin << Memory::YUZU_PAGEBITS, + cache_bytes, true); + } cache_bytes = 0; } }; |