user32: Use RtlIsCriticalSectionLockedByThread to check lock owner.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2015-10-10 05:40:36 +02:00 committed by Alexandre Julliard
parent 04bd68409a
commit 240cf96235
1 changed files with 1 additions and 1 deletions

View File

@ -81,7 +81,7 @@ void USER_Unlock(void)
*/
void USER_CheckNotLock(void)
{
if (user_section.OwningThread == ULongToHandle(GetCurrentThreadId()) && user_section.RecursionCount)
if (RtlIsCriticalSectionLockedByThread(&user_section))
{
ERR( "BUG: holding USER lock\n" );
DebugBreak();