Commit c71417ce authored by Alexandre Julliard's avatar Alexandre Julliard

Fixed crash in BitBlt when source DC is NULL.

parent d7c606d6
...@@ -85,7 +85,7 @@ BOOL WINAPI BitBlt( HDC hdcDst, INT xDst, INT yDst, INT width, ...@@ -85,7 +85,7 @@ BOOL WINAPI BitBlt( HDC hdcDst, INT xDst, INT yDst, INT width,
hdcDst, xDst, yDst, width, height, dcDst->bitsPerPixel, rop); hdcDst, xDst, yDst, width, height, dcDst->bitsPerPixel, rop);
if (dcDst->funcs->pBitBlt) if (dcDst->funcs->pBitBlt)
ret = dcDst->funcs->pBitBlt( dcDst->physDev, xDst, yDst, width, height, ret = dcDst->funcs->pBitBlt( dcDst->physDev, xDst, yDst, width, height,
dcSrc->physDev, xSrc, ySrc, rop ); dcSrc ? dcSrc->physDev : NULL, xSrc, ySrc, rop );
if (dcSrc) GDI_ReleaseObj( hdcSrc ); if (dcSrc) GDI_ReleaseObj( hdcSrc );
GDI_ReleaseObj( hdcDst ); GDI_ReleaseObj( hdcDst );
} }
......
...@@ -1503,7 +1503,7 @@ BOOL X11DRV_BitBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst, ...@@ -1503,7 +1503,7 @@ BOOL X11DRV_BitBlt( X11DRV_PDEVICE *physDevDst, INT xDst, INT yDst,
BOOL result = FALSE; BOOL result = FALSE;
INT sSrc, sDst; INT sSrc, sDst;
RECT visRectDst, visRectSrc; RECT visRectDst, visRectSrc;
DC *dcSrc = physDevSrc->dc; DC *dcSrc = physDevSrc ? physDevSrc->dc : NULL;
DC *dcDst = physDevDst->dc; DC *dcDst = physDevDst->dc;
if (((rop >> 16) & 0x55) == ((rop >> 17) & 0x55)) { if (((rop >> 16) & 0x55) == ((rop >> 17) & 0x55)) {
......
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