hle: kernel: k_thread_local_page: Skip Finalize when we are shutting down the kernel.

This commit is contained in:
bunnei
2022-03-28 18:56:04 -07:00
parent 9aff697440
commit b97c4b27e6

View File

@@ -37,6 +37,11 @@ ResultCode KThreadLocalPage::Initialize(KernelCore& kernel, KProcess* process) {
}
ResultCode KThreadLocalPage::Finalize() {
// If we are actively shutting down, there is nothing to do here.
if (m_kernel->IsShuttingDown()) {
return ResultSuccess;
}
// Get the physical address of the page.
const PAddr phys_addr = m_owner->PageTable().GetPhysicalAddr(m_virt_addr);
ASSERT(phys_addr);