fix: dupe top_bar and bottom_bar to keep it in scope

This commit is contained in:
CJ van den Berg 2024-08-25 23:26:18 +02:00
parent 042b2f330d
commit bff019e26e
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -90,6 +90,8 @@ fn init(a: Allocator) !*Self {
const theme = get_theme_by_name(conf.theme) orelse get_theme_by_name("dark_modern") orelse return tp.exit("unknown theme"); const theme = get_theme_by_name(conf.theme) orelse get_theme_by_name("dark_modern") orelse return tp.exit("unknown theme");
conf.theme = theme.name; conf.theme = theme.name;
conf.input_mode = try a.dupe(u8, conf.input_mode); conf.input_mode = try a.dupe(u8, conf.input_mode);
conf.top_bar = try a.dupe(u8, conf.top_bar);
conf.bottom_bar = try a.dupe(u8, conf.bottom_bar);
const frame_rate: usize = @intCast(tp.env.get().num("frame-rate")); const frame_rate: usize = @intCast(tp.env.get().num("frame-rate"));
if (frame_rate != 0) if (frame_rate != 0)