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) { | |||
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | std::optional<VAddr> MemoryManager::GpuToCpuAddress(GPUVAddr gpu_addr) const { | 195 | std::optional<VAddr> MemoryManager::GpuToCpuAddress(GPUVAddr gpu_addr) const { |
| 196 | if (gpu_addr >= address_space_size) [[unlikely]] { | ||
| 197 | return std::nullopt; | ||
| 198 | } | ||
| 196 | if (GetEntry<true>(gpu_addr) != EntryType::Mapped) [[unlikely]] { | 199 | if (GetEntry<true>(gpu_addr) != EntryType::Mapped) [[unlikely]] { |
| 197 | if (GetEntry<false>(gpu_addr) != EntryType::Mapped) { | 200 | if (GetEntry<false>(gpu_addr) != EntryType::Mapped) { |
| 198 | return std::nullopt; | 201 | return std::nullopt; |