user32: Only call GlobalUnlock when GlobalLock was successful.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f9d4057574
commit
a78fd8a07e
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user