Commit de25e6f0 authored by Alexandre Julliard's avatar Alexandre Julliard

Set last error in GlobalUnlock.

parent 03131aae
......@@ -1129,11 +1129,13 @@ BOOL WINAPI GlobalUnlock(
if((pintern->LockCount<GLOBAL_LOCK_MAX)&&(pintern->LockCount>0))
pintern->LockCount--;
locked=(pintern->LockCount==0) ? FALSE : TRUE;
locked = (pintern->LockCount != 0);
if (!locked) SetLastError(NO_ERROR);
}
else
{
WARN("invalid handle\n");
SetLastError(ERROR_INVALID_HANDLE);
locked=FALSE;
}
/* HeapUnlock(GetProcessHeap()); */
......
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