Skip to content

Commit d98f682

Browse files
committed
Panic on rare case
1 parent 0dbb4fa commit d98f682

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

kernel/src/kernel/system/interrupts/exceptions.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "kernel/tasking/tasking.hpp"
2929
#include "kernel/tasking/tasking_memory.hpp"
3030
#include "shared/logger/logger.hpp"
31+
#include "shared/panic.hpp"
3132

3233
#define DEBUG_PRINT_STACK_TRACE 1
3334

@@ -236,6 +237,9 @@ void exceptionsHandle(g_task* task)
236237
{
237238
bool resolved = false;
238239

240+
if(!task)
241+
panic("%! unresolved exception before initializing tasking system", "exceptions");
242+
239243
switch(task->state->intr)
240244
{
241245
case 0x00:

0 commit comments

Comments
 (0)