From 572780ed6d727bfdf0d5d6fc2ef1edbffddc356d Mon Sep 17 00:00:00 2001 From: Hajime Hoshi Date: Sun, 10 Nov 2019 19:09:38 +0900 Subject: [PATCH] uidriver/glfw: Bug fix: errors are ignored at (*UserInterface).run Updates #978 --- internal/uidriver/glfw/ui.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/uidriver/glfw/ui.go b/internal/uidriver/glfw/ui.go index 815075626..2b2fe9d9d 100644 --- a/internal/uidriver/glfw/ui.go +++ b/internal/uidriver/glfw/ui.go @@ -586,7 +586,7 @@ func (u *UserInterface) RunWithoutMainLoop(width, height int, scale float64, tit } func (u *UserInterface) run(width, height int, scale float64, title string, context driver.UIContext) error { - _ = u.t.Call(func() error { + if err := u.t.Call(func() error { if u.graphics.IsGL() { glfw.WindowHint(glfw.ContextVersionMajor, 2) glfw.WindowHint(glfw.ContextVersionMinor, 1) @@ -682,7 +682,9 @@ func (u *UserInterface) run(width, height int, scale float64, title string, cont u.reqHeight = h }) return nil - }) + }); err != nil { + return err + } var w uintptr _ = u.t.Call(func() error {