mirror of
https://git.h3cjp.net/H3cJP/citra.git
synced 2024-11-24 11:33:02 +00:00
kernel: Nullability check for current_cpu when changing memory page table
This attempts to fix segfault in some tests where page table is set before initializing cpu core (intended behaviour? might be worth a check...) see: src/tests/core/arm/arm_test_common.cpp see: src/tests/core/arm/dyncom/arm_dyncom_vfp_tests.cpp
This commit is contained in:
parent
dbfd830695
commit
ed095f3bff
|
@ -53,7 +53,9 @@ void KernelSystem::SetCurrentProcess(std::shared_ptr<Process> process) {
|
|||
|
||||
void KernelSystem::SetCurrentMemPageTable(Memory::PageTable* page_table) {
|
||||
memory.SetCurrentPageTable(page_table);
|
||||
current_cpu->PageTableChanged(); // notify the CPU the page table in memory has changed
|
||||
if (current_cpu != nullptr) {
|
||||
current_cpu->PageTableChanged(); // notify the CPU the page table in memory has changed
|
||||
}
|
||||
}
|
||||
|
||||
void KernelSystem::SetCPU(std::shared_ptr<ARM_Interface> cpu) {
|
||||
|
|
Loading…
Reference in a new issue