Init check

This commit is contained in:
Lyssieth 2024-12-02 04:33:46 +02:00
parent 74393b27ac
commit 4fdacb0bec
Signed by untrusted user who does not match committer: lyssieth
GPG key ID: 200268854934CFAB

View file

@ -130,7 +130,12 @@ pub fn logFn(comptime level: Level, comptime scope: Scope, comptime format: []co
}
fn get() !*Globals {
return &core orelse error.NotInitialized;
var cor = core;
if (cor) |*co| {
return co;
}
unreachable; // logging is not initialized
}
fn logFnImpl(comptime level: Level, comptime scope: Scope, comptime format: []const u8, args: anytype) !void {