From 26e0db206409a19a7e6fe1132006edc6b4f32ea0 Mon Sep 17 00:00:00 2001 From: Stephen Gutekanst Date: Sat, 17 Jul 2021 13:59:26 -0700 Subject: [PATCH] glfw: always check init errors Signed-off-by: Stephen Gutekanst --- glfw/src/main.zig | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/glfw/src/main.zig b/glfw/src/main.zig index 5650e660..0ab6aa2d 100644 --- a/glfw/src/main.zig +++ b/glfw/src/main.zig @@ -40,10 +40,8 @@ pub const version = @import("version.zig"); /// /// @thread_safety This function must only be called from the main thread. pub inline fn init() Error!void { - if (c.glfwInit() != c.GLFW_TRUE) { - return try getError(); - } - return; + _ = c.glfwInit(); + return try getError(); } /// Terminates the GLFW library.