From 3d2df2334e13954c166d46013609856113db4d97 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Wed, 12 Feb 2014 21:33:24 -0500 Subject: Fixed compiler errors. New code structure success! --- stdwndclass_windows.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'stdwndclass_windows.go') 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 -- cgit v1.2.3