Made access to the wnd struct thread-safe.
diff --git a/windows/input.c b/windows/input.c
index 1014ca3..7d85979 100644
--- a/windows/input.c
+++ b/windows/input.c
@@ -335,6 +335,7 @@
WND* wndPtr = WIN_FindWndPtr( capturePrev );
if( wndPtr && (wndPtr->flags & WIN_ISWIN32) )
SendMessageA( capturePrev, WM_CAPTURECHANGED, 0L, hwnd);
+ WIN_ReleaseWndPtr(wndPtr);
}
}
@@ -345,6 +346,7 @@
if ( pCurMsgQ )
QUEUE_Unlock( pCurMsgQ );
+ WIN_ReleaseWndPtr(wndPtr);
return capturePrev;
}
@@ -598,6 +600,8 @@
iStat = (hMenu) ? GetMenuState(hMenu,
cmd, MF_BYCOMMAND) : -1 ;
+ WIN_ReleaseWndPtr(wndPtr);
+
if (iSysStat!=-1)
{
if (iSysStat & (MF_DISABLED|MF_GRAYED))