From a4182c606b634615adb7f61d8b22dd92fdb8cabb Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Tue, 11 Feb 2014 19:27:58 -0500 Subject: [PATCH] Whoops, copy-paste fail somehow changed init error checks. Now it starts... and hangs before creating a window... --- stdwndclass_windows.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go index 14a44aa..c550201 100644 --- a/stdwndclass_windows.go +++ b/stdwndclass_windows.go @@ -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)