Commit a78fd8a0 authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

user32: Only call GlobalUnlock when GlobalLock was successful.

parent f9d40575
......@@ -89,8 +89,11 @@ static LCID get_clipboard_locale(void)
if ((data = GetClipboardData( CF_LOCALE )))
{
LCID *ptr = GlobalLock( data );
if (ptr && GlobalSize( data ) >= sizeof(*ptr)) lcid = *ptr;
GlobalUnlock( data );
if (ptr)
{
if (GlobalSize( data ) >= sizeof(*ptr)) lcid = *ptr;
GlobalUnlock( data );
}
}
return lcid;
}
......
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