Whoops, copy-paste fail somehow changed init error checks. Now it starts... and hangs before creating a window...

This commit is contained in:
Pietro Gagliardi 2014-02-11 19:27:58 -05:00
parent 73fa611b37
commit a4182c606b
1 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ func registerStdWndClass() (err error) {
r1, _, err := user32.NewProc("LoadIconW").Call(
uintptr(_NULL),
uintptr(_IDI_APPLICATION))
if err != nil {
if r1 == 0 { // failure
return fmt.Errorf("error getting window icon: %v", err)
}
icon := _HANDLE(r1)
@ -77,7 +77,7 @@ func registerStdWndClass() (err error) {
r1, _, err = user32.NewProc("LoadCursorW").Call(
uintptr(_NULL),
uintptr(_IDC_ARROW))
if err != nil {
if r1 == 0 { // failure
return fmt.Errorf("error getting window cursor: %v", err)
}
cursor := _HANDLE(r1)