Module: wine Branch: master Commit: 5953a86ab180575c71f3d001e0c6a05cf8348c26 URL: http://source.winehq.org/git/wine.git/?a=commit;h=5953a86ab180575c71f3d001e0...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Mar 10 17:21:33 2008 +0100
gdi32: Properly handle SetDIBits failure in StretchDIBits.
---
dlls/gdi32/dib.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/gdi32/dib.c b/dlls/gdi32/dib.c index f5e8707..3205d0d 100644 --- a/dlls/gdi32/dib.c +++ b/dlls/gdi32/dib.c @@ -290,13 +290,13 @@ INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst, dwRop ); }
- SetDIBits(hdcMem, hBitmap, 0, height, bits, info, wUsage); + heightSrc = SetDIBits(hdcMem, hBitmap, 0, height, bits, info, wUsage);
/* Origin for DIBitmap may be bottom left (positive biHeight) or top left (negative biHeight) */ - StretchBlt( hdc, xDst, yDst, widthDst, heightDst, - hdcMem, xSrc, abs(height) - heightSrc - ySrc, - widthSrc, heightSrc, dwRop ); + if (heightSrc) StretchBlt( hdc, xDst, yDst, widthDst, heightDst, + hdcMem, xSrc, abs(height) - heightSrc - ySrc, + widthSrc, heightSrc, dwRop ); if(hpal) SelectPalette(hdcMem, hpal, FALSE); SelectObject( hdcMem, hOldBitmap );