From bc531d60d703e0113973a965450383049b930b73 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 11 Feb 2014 19:34:28 -0500 Subject: [PATCH] More of the previous error and not printing panics... derp me. Still not fixed yet though... --- main.go | 5 ++++- sysdata_windows.go | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index a20a745..e1ff2a1 100644 --- a/main.go +++ b/main.go @@ -4,7 +4,10 @@ package main func main() { w := NewWindow("Main Window") w.Closing = make(chan struct{}) - w.Open() + err := w.Open() + if err != nil { + panic(err) + } <-w.Closing w.Close() } diff --git a/sysdata_windows.go b/sysdata_windows.go index 6711c91..7dbaae6 100644 --- a/sysdata_windows.go +++ b/sysdata_windows.go @@ -60,7 +60,7 @@ func (s *sysData) make() (err error) { ret: ret, } r := <-ret - if r.err != nil { + if r.ret == 0 { // failure return r.err } s.hwnd = _HWND(r.ret)