Init check
This commit is contained in:
parent
74393b27ac
commit
4fdacb0bec
1 changed files with 6 additions and 1 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue