From d6f32150064cbd664e2f0931bc0af0379ec00e66 Mon Sep 17 00:00:00 2001 From: ajzaff Date: Mon, 26 Apr 2021 16:59:31 -0400 Subject: [PATCH] mustard: Check glfw error before using the handle. Issue #24 references some issues on Windows that this might have helped debug. --- mustard/window.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mustard/window.go b/mustard/window.go index ca20dc2..19f0908 100644 --- a/mustard/window.go +++ b/mustard/window.go @@ -21,6 +21,9 @@ func SetGLFWHints() { func CreateNewWindow(title string, width int, height int, hiDPI bool) *Window { glw, err := glfw.CreateWindow(width, height, title, nil, nil) + if err != nil { + log.Fatal(err) + } glw.SetSizeLimits(300, 200, glfw.DontCare, glfw.DontCare) if err != nil {