mach: fix panic on application exit (invalid free)

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-08-29 01:20:18 -07:00
parent 22f14ee1ed
commit ec0be9294d

View file

@ -30,7 +30,8 @@ pub const Platform = struct {
last_position: glfw.Window.Pos,
wait_event_timeout: f64 = 0.0,
cursors: [@typeInfo(enums.MouseCursor).Enum.fields.len]?glfw.Cursor = undefined,
cursors: [@typeInfo(enums.MouseCursor).Enum.fields.len]?glfw.Cursor =
std.mem.zeroes([@typeInfo(enums.MouseCursor).Enum.fields.len]?glfw.Cursor),
cursors_tried: [@typeInfo(enums.MouseCursor).Enum.fields.len]bool =
[_]bool{false} ** @typeInfo(enums.MouseCursor).Enum.fields.len,