:: commit fc2fe1a3d2c963203dbd051312fab3fa00ea7423

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

parents: d65d180c0d

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

diff --git a/common/protos/limine.c b/common/protos/limine.c
index 6d2a75f6..6c8c432e 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