move runtime crash to shutdown

This commit is contained in:
lordwelch 2016-04-07 10:11:42 -07:00
parent 296ec8a94b
commit bba9f04902
2 changed files with 7 additions and 3 deletions

View File

@ -148,15 +148,15 @@ func glInit() {
qml.Func1 = func() int {
if !win.ShouldClose() {
glfw.PollEvents()
//glfw.PollEvents()
drawSlide()
win.SwapBuffers()
return 0
}
win.Hide()
win.Destroy()
glfw.Terminate()
//win.Destroy()
//glfw.Terminate()
return 1
}

View File

@ -7,6 +7,7 @@ import (
"path/filepath"
"github.com/kardianos/osext"
"github.com/go-gl/glfw/v3.1/glfw"
"github.com/lordwelch/qml"
"gopkg.in/gographics/imagick.v2/imagick"
)
@ -35,6 +36,9 @@ func main() {
fmt.Fprintf(os.Stderr, "error: %v\n", err)
os.Exit(1)
}
win.Destroy()
glfw.PollEvents()
glfw.Terminate()
}