diff options
Diffstat (limited to 'src/core/memory.cpp')
| -rw-r--r-- | src/core/memory.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 41fd2a6a0..643afdee8 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp | |||
| @@ -125,14 +125,13 @@ void RemoveDebugHook(PageTable& page_table, VAddr base, u64 size, MemoryHookPoin | |||
| 125 | * using a VMA from the current process | 125 | * using a VMA from the current process |
| 126 | */ | 126 | */ |
| 127 | static u8* GetPointerFromVMA(const Kernel::Process& process, VAddr vaddr) { | 127 | static u8* GetPointerFromVMA(const Kernel::Process& process, VAddr vaddr) { |
| 128 | u8* direct_pointer = nullptr; | 128 | const auto& vm_manager = process.VMManager(); |
| 129 | |||
| 130 | auto& vm_manager = process.VMManager(); | ||
| 131 | 129 | ||
| 132 | auto it = vm_manager.FindVMA(vaddr); | 130 | const auto it = vm_manager.FindVMA(vaddr); |
| 133 | ASSERT(it != vm_manager.vma_map.end()); | 131 | DEBUG_ASSERT(vm_manager.IsValidHandle(it)); |
| 134 | 132 | ||
| 135 | auto& vma = it->second; | 133 | u8* direct_pointer = nullptr; |
| 134 | const auto& vma = it->second; | ||
| 136 | switch (vma.type) { | 135 | switch (vma.type) { |
| 137 | case Kernel::VMAType::AllocatedMemoryBlock: | 136 | case Kernel::VMAType::AllocatedMemoryBlock: |
| 138 | direct_pointer = vma.backing_block->data() + vma.offset; | 137 | direct_pointer = vma.backing_block->data() + vma.offset; |