diff options
-rw-r--r-- | src/video_core/memory_manager.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp index 0f97db272..4e52ce0fd 100644 --- a/src/video_core/memory_manager.cpp +++ b/src/video_core/memory_manager.cpp @@ -193,6 +193,9 @@ void MemoryManager::Unmap(GPUVAddr gpu_addr, std::size_t size) { } std::optional<VAddr> MemoryManager::GpuToCpuAddress(GPUVAddr gpu_addr) const { + if (gpu_addr >= address_space_size) [[unlikely]] { + return std::nullopt; + } if (GetEntry<true>(gpu_addr) != EntryType::Mapped) [[unlikely]] { if (GetEntry<false>(gpu_addr) != EntryType::Mapped) { return std::nullopt; |