From 240cf962357c9844ef55e5a537e711c831f0ccfc Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 10 Oct 2015 05:40:36 +0200 Subject: [PATCH] user32: Use RtlIsCriticalSectionLockedByThread to check lock owner. Signed-off-by: Sebastian Lackner Signed-off-by: Alexandre Julliard --- dlls/user32/user_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/user32/user_main.c b/dlls/user32/user_main.c index 718abe0e83..45aea81ec1 100644 --- a/dlls/user32/user_main.c +++ b/dlls/user32/user_main.c @@ -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();