fix(config): fix null value access when config file are not used

This commit is contained in:
utox39 committed 2025-09-13 17:40:53 +02:00
1 parent 1dc0559b8e
commit abff59b7d6
1 file changed
+3 -1
+3 -1
View File
@@ -31,7 +31,9 @@ pub const ModuleType = enum {
};
pub fn getAsciiPath(config: ?std.json.Parsed(Config)) ?[]u8 {
return config.?.value.ascii_abs_path;
if (config) |c| {
return c.value.ascii_abs_path;
} else return null;
}
pub fn getModulesTypes(allocator: std.mem.Allocator, config: ?std.json.Parsed(Config)) !std.array_list.Managed(ModuleType) {