From 326e7c70208865b013e138972b25687d805488d0 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Wed, 21 Jun 2017 20:21:49 -0700 Subject: Memory: Make PhysicalToVirtualAddress return a boost::optional And fix a few places in the code to take advantage of that. --- src/core/hle/kernel/shared_memory.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/core/hle/kernel') diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index 922e5ab58..a7b66142f 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp @@ -149,7 +149,7 @@ ResultCode SharedMemory::Map(Process* target_process, VAddr address, MemoryPermi if (base_address == 0 && target_address == 0) { // Calculate the address at which to map the memory block. - target_address = Memory::PhysicalToVirtualAddress(linear_heap_phys_address); + target_address = Memory::PhysicalToVirtualAddress(linear_heap_phys_address).value(); } // Map the memory block into the target process -- cgit v1.2.3