Release DC in error condition on StretchDIBits.
This commit is contained in:
parent
f5db41b2a1
commit
31acf7f5a5
|
@ -233,6 +233,8 @@ INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst,
|
|||
WORD planes, bpp;
|
||||
DWORD compr, size;
|
||||
|
||||
GDI_ReleaseObj( hdc );
|
||||
|
||||
if (DIB_GetBitmapInfo( &info->bmiHeader, &width, &height, &planes, &bpp, &compr, &size ) == -1)
|
||||
{
|
||||
ERR("Invalid bitmap\n");
|
||||
|
@ -245,7 +247,6 @@ INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst,
|
|||
return 0;
|
||||
}
|
||||
|
||||
GDI_ReleaseObj( hdc );
|
||||
hdcMem = CreateCompatibleDC( hdc );
|
||||
hBitmap = CreateCompatibleBitmap(hdc, width, height);
|
||||
hOldBitmap = SelectObject( hdcMem, hBitmap );
|
||||
|
|
Loading…
Reference in New Issue