[zion] Check if scheduler exists in PF handler before trying to resolve

This commit is contained in:
Drew Galbraith 2023-08-01 23:10:20 -07:00
parent 35b1844862
commit 259c64ef2a
1 changed files with 2 additions and 1 deletions

View File

@ -95,7 +95,8 @@ extern "C" void interrupt_page_fault(InterruptFrame* frame) {
uint64_t err = frame->error_code;
if ((err & 0x1) == 0) {
// Page not present error may be resolveable.
if (gScheduler->CurrentProcess().vmas()->HandlePageFault(frame->cr2)) {
if (gScheduler &&
gScheduler->CurrentProcess().vmas()->HandlePageFault(frame->cr2)) {
return;
}
}