mach: add missing errdefer if GLFW window creation fails

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
Stephen Gutekanst 2022-08-11 00:44:44 -07:00 committed by Stephen Gutekanst
parent 85ddeeed5c
commit 2b354f9226

View file

@ -603,6 +603,7 @@ pub fn main() !void {
pub fn coreInit(allocator: std.mem.Allocator) !*Core {
const core: *Core = try allocator.create(Core);
errdefer allocator.destroy(core);
core.* = try Core.init(allocator);
// Glfw specific: initialize the user pointer used in callbacks