diff --git a/src/sys/log.c b/src/sys/log.c index bbf2c37..e3a7cd6 100644 --- a/src/sys/log.c +++ b/src/sys/log.c @@ -16,6 +16,9 @@ void log_init(void) void log_register_stream(FILE* restrict stream) { + if (stream == NULL) + PANIC("stream to register is NULL"); + if (GlobalLogger.stream_count == 0) { GlobalLogger.streams = (FILE**) malloc(sizeof(FILE*));