Skip to content

Commit f301bee

Browse files
authored
Merge pull request #25 from ajzaff/feature-check-glw-err
mustard: Check glfw error before using the handle
2 parents 49e1632 + d6f3215 commit f301bee

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mustard/window.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ func SetGLFWHints() {
2121

2222
func CreateNewWindow(title string, width int, height int, hiDPI bool) *Window {
2323
glw, err := glfw.CreateWindow(width, height, title, nil, nil)
24+
if err != nil {
25+
log.Fatal(err)
26+
}
2427
glw.SetSizeLimits(300, 200, glfw.DontCare, glfw.DontCare)
2528

2629
if err != nil {

0 commit comments

Comments
 (0)