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,7 +283,8 @@ static HANDLE render_synthesized_dib( HANDLE data, UINT format, UINT from ) ...@@ -283,7 +283,8 @@ 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; bmi = (BITMAPINFO *)ret;
memset( bmi, 0, header_size ); memset( bmi, 0, header_size );
memcpy( bmi, src, min( header_size, src_size )); memcpy( bmi, src, min( header_size, src_size ));
...@@ -291,6 +292,8 @@ static HANDLE render_synthesized_dib( HANDLE data, UINT format, UINT from ) ...@@ -291,6 +292,8 @@ static HANDLE render_synthesized_dib( HANDLE data, UINT format, UINT from )
/* FIXME: convert colors according to DIBv5 color profile */ /* FIXME: convert colors according to DIBv5 color profile */
memcpy( (char *)bmi + header_size, (char *)src + src_size, bits_size ); memcpy( (char *)bmi + header_size, (char *)src + src_size, bits_size );
} }
GlobalUnlock( data );
}
done: done:
ReleaseDC( 0, hdc ); ReleaseDC( 0, hdc );
......
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