mach: add missing errdefer if GLFW window creation fails
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
85ddeeed5c
commit
2b354f9226
1 changed files with 1 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue