From 063db7734678c5a9fc6e270957cf84a70069280c Mon Sep 17 00:00:00 2001 From: DrChat Date: Wed, 20 Dec 2017 17:54:31 -0600 Subject: [PATCH] [Core] Don't pass in old protection pointer if the caller doesn't need it --- src/xenia/memory.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xenia/memory.cc b/src/xenia/memory.cc index 9bf8b565e..5461f027a 100644 --- a/src/xenia/memory.cc +++ b/src/xenia/memory.cc @@ -1054,7 +1054,7 @@ bool BaseHeap::Protect(uint32_t address, uint32_t size, uint32_t protect, if (!xe::memory::Protect( membase_ + heap_base_ + start_page_number * page_size_, page_count * page_size_, ToPageAccess(protect), - &old_protect_access)) { + old_protect ? &old_protect_access : nullptr)) { XELOGE("BaseHeap::Protect failed due to host VirtualProtect failure"); return false; }