summaryrefslogtreecommitdiff
path: root/stdwndclass_windows.go
diff options
context:
space:
mode:
Diffstat (limited to 'stdwndclass_windows.go')
-rw-r--r--stdwndclass_windows.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/stdwndclass_windows.go b/stdwndclass_windows.go
index ad99ce4..b87743f 100644
--- a/stdwndclass_windows.go
+++ b/stdwndclass_windows.go
@@ -27,12 +27,12 @@ func stdWndProc(s *sysData) func(hwnd _HWND, uMsg uint32, wParam _WPARAM, lParam
case _WM_COMMAND:
id := _HMENU(wParam.LOWORD())
s.childrenLock.Lock()
- defer s.childrenLock.Unlock()
- ss = s.children[id]
+ ss := s.children[id]
+ s.childrenLock.Unlock()
switch ss.ctype {
case c_button:
if wParam.HIWORD() == _BN_CLICKED {
- sysData.event <- struct{}{}
+ ss.event <- struct{}{}
}
}
return 0