StretchDIBits: avoid crash on null pointers.

This commit is contained in:
Steve Lustbader 2002-11-25 01:10:04 +00:00 committed by Alexandre Julliard
parent bcca0cb395
commit 473d6cbd27
1 changed files with 7 additions and 2 deletions

View File

@ -155,9 +155,14 @@ INT WINAPI StretchDIBits(HDC hdc, INT xDst, INT yDst, INT widthDst,
INT heightSrc, const void *bits,
const BITMAPINFO *info, UINT wUsage, DWORD dwRop )
{
DC *dc = DC_GetDCUpdate( hdc );
if(!dc) return FALSE;
DC *dc;
if (!bits || !info)
return 0;
dc = DC_GetDCUpdate( hdc );
if(!dc) return FALSE;
if(dc->funcs->pStretchDIBits)
{
heightSrc = dc->funcs->pStretchDIBits(dc->physDev, xDst, yDst, widthDst,