summaryrefslogtreecommitdiff
path: root/stdwndclass_windows.go
diff options
context:
space:
mode:
authorPietro Gagliardi <[email protected]>2014-02-11 19:27:58 -0500
committerPietro Gagliardi <[email protected]>2014-02-11 19:27:58 -0500
commita4182c606b634615adb7f61d8b22dd92fdb8cabb (patch)
treeec8be433f18631b49e6ffafb23368188405e22d1 /stdwndclass_windows.go
parent73fa611b3726fbb2f6af198e8a0744add75c4e94 (diff)
Whoops, copy-paste fail somehow changed init error checks. Now it starts... and hangs before creating a window...
Diffstat (limited to 'stdwndclass_windows.go')
-rw-r--r--stdwndclass_windows.go4
1 files 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)