From 464022a61d2f4b7d98dc2966c4238ac00136aac9 Mon Sep 17 00:00:00 2001 From: EnderIce2 Date: Tue, 19 Mar 2024 02:20:58 +0200 Subject: [PATCH] Check Display class in InitFont() --- core/panic/handler.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/panic/handler.cpp b/core/panic/handler.cpp index 1cba9b2..ac6fa4f 100644 --- a/core/panic/handler.cpp +++ b/core/panic/handler.cpp @@ -105,6 +105,12 @@ nsa void InitFont() { /* Hope we won't crash here */ + if (Display == nullptr) + { + error("Can't initialize font without display initalized"); + CPU::Stop(); + } + if (FbBeforePanic != nullptr) KernelAllocator.FreePages(FbBeforePanic, FbPagesBeforePanic); else