gdi32: Fix GDI locking in SetBitmapBits.

This commit is contained in:
Dmitry Timoshkov 2010-03-10 16:30:28 +08:00 committed by Alexandre Julliard
parent 1719f8faf1
commit c7b45aa8d3

View file

@ -436,11 +436,13 @@ LONG WINAPI SetBitmapBits(
LONG count, /* [in] Number of bytes in bitmap array */
LPCVOID bits) /* [in] Address of array with bitmap bits */
{
BITMAPOBJ *bmp = GDI_GetObjPtr( hbitmap, OBJ_BITMAP );
BITMAPOBJ *bmp;
LONG height, ret;
if ((!bmp) || (!bits))
return 0;
if (!bits) return 0;
bmp = GDI_GetObjPtr( hbitmap, OBJ_BITMAP );
if (!bmp) return 0;
if (count < 0) {
WARN("(%d): Negative number of bytes passed???\n", count );