More of the previous error and not printing panics... derp me. Still not fixed yet though...

This commit is contained in:
Pietro Gagliardi 2014-02-11 19:34:28 -05:00
parent a4182c606b
commit bc531d60d7
2 changed files with 5 additions and 2 deletions

View File

@ -4,7 +4,10 @@ package main
func main() { func main() {
w := NewWindow("Main Window") w := NewWindow("Main Window")
w.Closing = make(chan struct{}) w.Closing = make(chan struct{})
w.Open() err := w.Open()
if err != nil {
panic(err)
}
<-w.Closing <-w.Closing
w.Close() w.Close()
} }

View File

@ -60,7 +60,7 @@ func (s *sysData) make() (err error) {
ret: ret, ret: ret,
} }
r := <-ret r := <-ret
if r.err != nil { if r.ret == 0 { // failure
return r.err return r.err
} }
s.hwnd = _HWND(r.ret) s.hwnd = _HWND(r.ret)