fix(gui): fix resize crash

This commit is contained in:
CJ van den Berg 2026-04-01 11:14:15 +02:00
parent 4ca31b0f75
commit 091345fd02
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9

View file

@ -213,6 +213,9 @@ pub const WindowState = struct {
c.deinit(global.glyph_cache_arena.allocator()); c.deinit(global.glyph_cache_arena.allocator());
_ = global.glyph_cache_arena.reset(.retain_capacity); _ = global.glyph_cache_arena.reset(.retain_capacity);
state.glyph_index_cache = null; state.glyph_index_cache = null;
// cell_buf was allocated from the arena; clear it so the next
// resize doesn't memcpy from the now-freed memory.
state.cell_buf = .{};
} }
} }