From e9d147349bd90b7b2ee6d0f9f5825de28c3a018e Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 2 Jul 2018 09:42:48 -0500 Subject: GPU: Allow GpuToCpuAddress to return boost::none for unmapped addresses. --- src/video_core/memory_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/video_core') diff --git a/src/video_core/memory_manager.cpp b/src/video_core/memory_manager.cpp index 5cefce9fc..2f814a184 100644 --- a/src/video_core/memory_manager.cpp +++ b/src/video_core/memory_manager.cpp @@ -100,9 +100,9 @@ boost::optional MemoryManager::FindFreeBlock(u64 size, u64 align) { boost::optional MemoryManager::GpuToCpuAddress(GPUVAddr gpu_addr) { VAddr base_addr = PageSlot(gpu_addr); - ASSERT(base_addr != static_cast(PageStatus::Unmapped)); - if (base_addr == static_cast(PageStatus::Allocated)) { + if (base_addr == static_cast(PageStatus::Allocated) || + base_addr == static_cast(PageStatus::Unmapped)) { return {}; } -- cgit v1.2.3