double free. whoops.

This commit is contained in:
RadsammyT 2026-03-25 23:45:38 -04:00
commit c7db89a314
No known key found for this signature in database

View file

@ -1096,7 +1096,6 @@ pub fn main() !void {
latest.info.counter = 1;
}
defer for (state.custom_info.items) |*item| {
state.allocator.free(item.lbl.text);
item.lbl.deinit();
};
@ -1788,7 +1787,7 @@ fn updateCustomInfo(lbl: *Label, ptr: *anyopaque) !void {
try stdout.print(state.allocator, "{s}: [{s}{s}]", .{ i.info.name, state.lang.custom_info_err_no_output, if (stderr.items.len > 0) state.lang.custom_info_err_no_output_error else "" });
}
state.allocator.free(lbl.text);
lbl.text = try state.allocator.dupe(u8, stdout.items);
try lbl.setTextAlloc(state.allocator, "{s}", .{stdout.items});
// Called to re-position the widgets after they receive their output.
try positionWidgets(state);