Skip to content

Commit bf5cf53

Browse files
Drop read lock before calling wnd_proc
1 parent f082632 commit bf5cf53

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/win/hook.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,7 @@ unsafe fn offer_message_to_baseview(msg: *mut MSG) -> bool {
131131
}
132132

133133
// check if this is one of our windows. if so, intercept it
134-
let state = HOOK_STATE.read().unwrap();
135-
136-
if state.open_windows.contains(&HWNDWrapper(msg.hwnd)) {
134+
if HOOK_STATE.read().unwrap().open_windows.contains(&HWNDWrapper(msg.hwnd)) {
137135
let _ = wnd_proc(msg.hwnd, msg.message, msg.wParam, msg.lParam);
138136

139137
return true;

0 commit comments

Comments
 (0)