user32: Add missing calls to GlobalUnlock in render_synthesized_dib.

Signed-off-by: Sebastian Lackner <sebastian@fds-team.de>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Sebastian Lackner 2016-09-07 20:52:35 +02:00 committed by Alexandre Julliard
parent a78fd8a07e
commit 5eb8217f6d
1 changed files with 10 additions and 7 deletions

View File

@ -283,13 +283,16 @@ static HANDLE render_synthesized_dib( HANDLE data, UINT format, UINT from )
header_size = (format == CF_DIBV5) ? sizeof(BITMAPV5HEADER) :
offsetof( BITMAPINFO, bmiColors[src->bmiHeader.biCompression == BI_BITFIELDS ? 3 : 0] );
if (!(ret = GlobalAlloc( GMEM_FIXED, header_size + bits_size ))) goto done;
bmi = (BITMAPINFO *)ret;
memset( bmi, 0, header_size );
memcpy( bmi, src, min( header_size, src_size ));
bmi->bmiHeader.biSize = header_size;
/* FIXME: convert colors according to DIBv5 color profile */
memcpy( (char *)bmi + header_size, (char *)src + src_size, bits_size );
if ((ret = GlobalAlloc( GMEM_FIXED, header_size + bits_size )))
{
bmi = (BITMAPINFO *)ret;
memset( bmi, 0, header_size );
memcpy( bmi, src, min( header_size, src_size ));
bmi->bmiHeader.biSize = header_size;
/* FIXME: convert colors according to DIBv5 color profile */
memcpy( (char *)bmi + header_size, (char *)src + src_size, bits_size );
}
GlobalUnlock( data );
}
done: