:: commit 6cbb9c4577db98afec28f8888ba8ab9edb361ad3

mintsuki <mintsuki@protonmail.com> — 2022-10-05 12:07

parents: ffa6d4e0c7

limine: Fix bug where NULL term was accessed. Fixes #227

diff --git a/common/protos/limine.c b/common/protos/limine.c
index e1597e7d..2b687c66 100644
--- a/common/protos/limine.c
+++ b/common/protos/limine.c
@@ -1006,9 +1006,10 @@ FEAT_START
 FEAT_END
 
     // Clear terminal for kernels that will use the Limine terminal
-    term_write(term, "\e[2J\e[H", 7);
-
-    term->in_bootloader = false;
+    if (term != NULL) {
+        term_write(term, "\e[2J\e[H", 7);
+        term->in_bootloader = false;
+    }
 
 #if defined (__x86_64__) || defined (__i386__)
 #if defined (BIOS)
tab: 248 wrap: offon