Commit 240cf962 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

user32: Use RtlIsCriticalSectionLockedByThread to check lock owner.

parent 04bd6840
...@@ -81,7 +81,7 @@ void USER_Unlock(void) ...@@ -81,7 +81,7 @@ void USER_Unlock(void)
*/ */
void USER_CheckNotLock(void) void USER_CheckNotLock(void)
{ {
if (user_section.OwningThread == ULongToHandle(GetCurrentThreadId()) && user_section.RecursionCount) if (RtlIsCriticalSectionLockedByThread(&user_section))
{ {
ERR( "BUG: holding USER lock\n" ); ERR( "BUG: holding USER lock\n" );
DebugBreak(); DebugBreak();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment