Commit 473d6cbd authored by Steve Lustbader's avatar Steve Lustbader Committed by Alexandre Julliard

StretchDIBits: avoid crash on null pointers.

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