From 259c64ef2a6c8ad2639de703c5d89d0f7a6344fc Mon Sep 17 00:00:00 2001 From: Drew Galbraith Date: Tue, 1 Aug 2023 23:10:20 -0700 Subject: [PATCH] [zion] Check if scheduler exists in PF handler before trying to resolve --- zion/interrupt/interrupt.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zion/interrupt/interrupt.cpp b/zion/interrupt/interrupt.cpp index b1ac511..9271788 100644 --- a/zion/interrupt/interrupt.cpp +++ b/zion/interrupt/interrupt.cpp @@ -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; } }