Commit 31acf7f5 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

Release DC in error condition on StretchDIBits.

parent f5db41b2
......@@ -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 );
......
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