Commit 5eb8217f authored by Sebastian Lackner's avatar Sebastian Lackner Committed by Alexandre Julliard

user32: Add missing calls to GlobalUnlock in render_synthesized_dib.

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